Update GitHub Artifact Actions to v6 #27
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: buildkit | |
| # Default to 'contents: read', which grants actions to read commits. | |
| # | |
| # If any permission is set, any permission not included in the list is | |
| # implicitly set to "none". | |
| # | |
| # see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - 'master' | |
| - '[0-9]+.[0-9]+' | |
| pull_request: | |
| env: | |
| GO_VERSION: "1.23.9" | |
| ALPINE_VERSION: "3.20" | |
| DESTDIR: ./build | |
| jobs: | |
| validate-dco: | |
| uses: ./.github/workflows/.dco.yml | |
| build: | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 120 # guardrails timeout for the whole job | |
| needs: | |
| - validate-dco | |
| steps: | |
| - | |
| name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: Build | |
| uses: docker/bake-action@v6 | |
| with: | |
| targets: binary | |
| - | |
| name: Upload artifacts | |
| uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6 | |
| with: | |
| name: binary | |
| path: ${{ env.DESTDIR }} | |
| if-no-files-found: error | |
| retention-days: 1 | |
| test: | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 120 # guardrails timeout for the whole job | |
| needs: | |
| - build | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| worker: | |
| - dockerd | |
| - dockerd-containerd | |
| pkg: | |
| - client | |
| - cmd/buildctl | |
| - solver | |
| - frontend | |
| - frontend/dockerfile | |
| typ: | |
| - integration | |
| steps: | |
| - | |
| name: Prepare | |
| run: | | |
| disabledFeatures="cache_backend_azblob,cache_backend_s3" | |
| if [ "${{ matrix.worker }}" = "dockerd" ]; then | |
| disabledFeatures="${disabledFeatures},merge_diff" | |
| fi | |
| echo "BUILDKIT_TEST_DISABLE_FEATURES=${disabledFeatures}" >> $GITHUB_ENV | |
| # Expose `ACTIONS_RUNTIME_TOKEN` and `ACTIONS_CACHE_URL`, which is used | |
| # in BuildKit's test suite to skip/unskip cache exporters: | |
| # https://github.com/moby/buildkit/blob/567a99433ca23402d5e9b9f9124005d2e59b8861/client/client_test.go#L5407-L5411 | |
| - | |
| name: Expose GitHub Runtime | |
| uses: crazy-max/ghaction-github-runtime@v3 | |
| - | |
| name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| path: moby | |
| - | |
| name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: ${{ env.GO_VERSION }} | |
| - | |
| name: BuildKit ref | |
| run: | | |
| # FIXME(aepifanov) temporarily overriding version to use for tests; remove with the next release of buildkit | |
| # echo "BUILDKIT_REF=$(./hack/buildkit-ref)" >> $GITHUB_ENV | |
| echo "BUILDKIT_REPO=moby/buildkit" >> $GITHUB_ENV | |
| echo "BUILDKIT_REF=b10aeed77fd8a370f6aec7ae4b212ab291914e08" >> $GITHUB_ENV | |
| working-directory: moby | |
| - | |
| name: Checkout BuildKit ${{ env.BUILDKIT_REF }} | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: ${{ env.BUILDKIT_REPO }} | |
| ref: ${{ env.BUILDKIT_REF }} | |
| path: buildkit | |
| - | |
| name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - | |
| name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - | |
| name: Download binary artifacts | |
| uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6 | |
| with: | |
| name: binary | |
| path: ./buildkit/build/moby/ | |
| - | |
| name: Update daemon.json | |
| run: | | |
| sudo rm -f /etc/docker/daemon.json | |
| sudo service docker restart | |
| docker version | |
| docker info | |
| - | |
| name: Test | |
| run: | | |
| ./hack/test ${{ matrix.typ }} | |
| env: | |
| CONTEXT: "." | |
| TEST_DOCKERD: "1" | |
| TEST_DOCKERD_BINARY: "./build/moby/dockerd" | |
| TESTPKGS: "./${{ matrix.pkg }}" | |
| TESTFLAGS: "-v --parallel=1 --timeout=30m --run=//worker=${{ matrix.worker }}$" | |
| working-directory: buildkit |