Skip to content

Commit

Permalink
Merge pull request #21735 from crazy-max/bake-v6
Browse files Browse the repository at this point in the history
update bake-action to v6
  • Loading branch information
crazy-max authored Jan 8, 2025
2 parents 7e1a59e + 7f3611a commit 2db1648
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 45 deletions.
17 changes: 7 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ jobs:
releaser:
runs-on: ubuntu-24.04
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
Expand All @@ -34,7 +31,7 @@ jobs:
driver-opts: image=${{ env.SETUP_BUILDKIT_IMAGE }}
-
name: Build
uses: docker/bake-action@v5
uses: docker/bake-action@v6
with:
files: |
docker-bake.hcl
Expand All @@ -56,8 +53,9 @@ jobs:
uses: docker/setup-buildx-action@v3
-
name: Build
uses: docker/bake-action@v5
uses: docker/bake-action@v6
with:
source: .
files: |
docker-bake.hcl
targets: release
Expand All @@ -66,8 +64,9 @@ jobs:
*.cache-to=type=gha,scope=build,mode=max
-
name: Check Cloudfront config
uses: docker/bake-action@v5
uses: docker/bake-action@v6
with:
source: .
targets: aws-cloudfront-update
env:
DRY_RUN: true
Expand Down Expand Up @@ -99,20 +98,18 @@ jobs:
- dockerfile-lint
- path-warnings
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Validate
uses: docker/bake-action@v5
uses: docker/bake-action@v6
with:
files: |
docker-bake.hcl
targets: ${{ matrix.target }}
set: |
*.args.BUILDKIT_CONTEXT_KEEP_GIT_DIR=1
*.cache-to=type=gha,scope=validate-${{ matrix.target }},mode=max
*.cache-from=type=gha,scope=validate-${{ matrix.target }}
*.cache-from=type=gha,scope=build
9 changes: 6 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,9 @@ jobs:
driver-opts: image=${{ env.SETUP_BUILDKIT_IMAGE }}
-
name: Build website
uses: docker/bake-action@v5
uses: docker/bake-action@v6
with:
source: .
files: |
docker-bake.hcl
targets: release
Expand Down Expand Up @@ -127,8 +128,9 @@ jobs:
-
name: Update S3 config
if: ${{ env.DOCS_S3_BUCKET != '' && env.DOCS_S3_CONFIG != '' }}
uses: docker/bake-action@v5
uses: docker/bake-action@v6
with:
source: .
files: |
docker-bake.hcl
targets: aws-s3-update-config
Expand All @@ -141,8 +143,9 @@ jobs:
-
name: Update Cloudfront config
if: ${{ env.DOCS_CLOUDFRONT_ID != '' }}
uses: docker/bake-action@v5
uses: docker/bake-action@v6
with:
source: .
files: |
docker-bake.hcl
targets: aws-cloudfront-update
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/validate-upstream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,9 @@ jobs:
driver-opts: image=${{ env.SETUP_BUILDKIT_IMAGE }}
-
name: Validate
uses: docker/bake-action@v5
uses: docker/bake-action@v6
with:
source: .
files: |
docker-bake.hcl
targets: validate-upstream
Expand Down
3 changes: 1 addition & 2 deletions content/manuals/build/bake/remote-definition.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,8 @@ and use the `cwd://` prefix for the metadata Bake file:

```yml
- name: Build
uses: docker/bake-action@v4
uses: docker/bake-action@v6
with:
source: "${{ github.server_url }}/${{ github.repository }}.git#${{ github.ref }}"
files: |
./docker-bake.hcl
cwd://${{ steps.meta.outputs.bake-file }}
Expand Down
9 changes: 3 additions & 6 deletions content/manuals/build/ci/github-actions/annotations.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,6 @@ jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
Expand All @@ -91,12 +88,12 @@ jobs:
images: ${{ env.IMAGE_NAME }}

- name: Build
uses: docker/bake-action@v5
uses: docker/bake-action@v6
with:
files: |
./docker-bake.hcl
${{ steps.meta.outputs.bake-file-tags }}
${{ steps.meta.outputs.bake-file-annotations }}
cwd://${{ steps.meta.outputs.bake-file-tags }}
cwd://${{ steps.meta.outputs.bake-file-annotations }}
push: true
```
Expand Down
2 changes: 1 addition & 1 deletion content/manuals/build/ci/github-actions/build-summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ or [Docker Buildx Bake](https://github.com/marketplace/actions/docker-buildx-bak
GitHub Actions:

- `docker/build-push-action@v6`
- `docker/bake-action@v5`
- `docker/bake-action@v6`

To view the job summary, open the details page for the job in GitHub after the
job has finished. The summary is available for both failed and successful
Expand Down
7 changes: 2 additions & 5 deletions content/manuals/build/ci/github-actions/checks.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,6 @@ jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
Expand All @@ -91,12 +88,12 @@ jobs:
uses: docker/setup-buildx-action@v3
- name: Validate build configuration
uses: docker/bake-action@v5
uses: docker/bake-action@v6
with:
targets: validate-build
- name: Build
uses: docker/bake-action@v5
uses: docker/bake-action@v6
with:
targets: build
push: true
Expand Down
7 changes: 2 additions & 5 deletions content/manuals/build/ci/github-actions/multi-platform.md
Original file line number Diff line number Diff line change
Expand Up @@ -350,9 +350,6 @@ jobs:
platform=${{ matrix.platform }}
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
- name: Checkout
uses: actions/checkout@v4
- name: Download meta bake definition
uses: actions/download-artifact@v4
with:
Expand All @@ -373,11 +370,11 @@ jobs:
- name: Build
id: bake
uses: docker/bake-action@v5
uses: docker/bake-action@v6
with:
files: |
./docker-bake.hcl
/tmp/bake-meta.json
cwd:///tmp/bake-meta.json
targets: image
set: |
*.tags=
Expand Down
10 changes: 2 additions & 8 deletions content/manuals/build/ci/github-actions/reproducible-builds.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,11 @@ jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build
uses: docker/bake-action@v5
uses: docker/bake-action@v6
env:
SOURCE_DATE_EPOCH: 0
```
Expand Down Expand Up @@ -115,17 +112,14 @@ jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Get Git commit timestamps
run: echo "TIMESTAMP=$(git log -1 --pretty=%ct)" >> $GITHUB_ENV
- name: Build
uses: docker/bake-action@v5
uses: docker/bake-action@v6
env:
SOURCE_DATE_EPOCH: ${{ env.TIMESTAMP }}
```
Expand Down
5 changes: 1 addition & 4 deletions content/manuals/build/ci/github-actions/secrets.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,6 @@ jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up SSH
uses: MrSquaare/ssh-setup-action@2d028b70b5e397cf8314c6eaea229a6c3e34977a # v3.1.0
with:
Expand All @@ -209,7 +206,7 @@ jobs:
private-key-name: github-ppk
- name: Build
uses: docker/bake-action@v5
uses: docker/bake-action@v6
with:
set: |
*.ssh=default
Expand Down

0 comments on commit 2db1648

Please sign in to comment.