fix: Combine jobs to allow for docker usage
Some checks failed
ci / docker-build-and-test (pull_request) Failing after 35s
Some checks failed
ci / docker-build-and-test (pull_request) Failing after 35s
This commit is contained in:
@@ -11,7 +11,7 @@ on:
|
|||||||
# https://docs.docker.com/build/ci/github-actions/share-image-jobs/
|
# https://docs.docker.com/build/ci/github-actions/share-image-jobs/
|
||||||
# just using caches instead of artifact upload.
|
# just using caches instead of artifact upload.
|
||||||
jobs:
|
jobs:
|
||||||
docker-build:
|
docker-build-and-test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
@@ -52,28 +52,6 @@ jobs:
|
|||||||
name: ${{ runner.os }}-docker-${{ steps.dockerfile-hash.outputs.hash }}
|
name: ${{ runner.os }}-docker-${{ steps.dockerfile-hash.outputs.hash }}
|
||||||
path: /tmp/docker/${{ runner.os }}-builder-image.tar
|
path: /tmp/docker/${{ runner.os }}-builder-image.tar
|
||||||
retention-days: 3
|
retention-days: 3
|
||||||
|
|
||||||
build-and-test:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: docker-build
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- uses: docker/setup-buildx-action@v2
|
|
||||||
- uses: actions/setup-go@v3
|
|
||||||
with:
|
|
||||||
go-version: '1.20'
|
|
||||||
-
|
|
||||||
name: Hash dockerfile
|
|
||||||
id: dockerfile-hash
|
|
||||||
uses: https://gitea.com/actions/go-hashfiles@v0.0.1
|
|
||||||
with:
|
|
||||||
patterns: builder.Dockerfile
|
|
||||||
-
|
|
||||||
name: Download docker image
|
|
||||||
uses: actions/download-artifact@v3
|
|
||||||
with:
|
|
||||||
name: ${{ runner.os }}-docker-${{ steps.dockerfile-hash.outputs.hash }}
|
|
||||||
path: /tmp/docker/${{ runner.os }}-builder-image.tar
|
|
||||||
-
|
-
|
||||||
name: Build library
|
name: Build library
|
||||||
uses: https://git.brocklobsta.net/brock/docker-run-action@v5
|
uses: https://git.brocklobsta.net/brock/docker-run-action@v5
|
||||||
@@ -108,5 +86,3 @@ jobs:
|
|||||||
name: reports-${{github.run_number}}
|
name: reports-${{github.run_number}}
|
||||||
path: ${{ env.ASSET }}
|
path: ${{ env.ASSET }}
|
||||||
retention-days: 3
|
retention-days: 3
|
||||||
|
|
||||||
# TODO: delete cache on merge.
|
|
||||||
|
|||||||
Reference in New Issue
Block a user