build(deps): bump docker/bake-action from 2 to 4 (#4253)

This commit is contained in:
Wang Yan 2024-01-15 17:39:41 +08:00 committed by GitHub
commit 88d854269f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 20 additions and 8 deletions

View file

@ -102,7 +102,6 @@ jobs:
with: with:
username: ${{ secrets.DOCKERHUB_USERNAME }} username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }} password: ${{ secrets.DOCKERHUB_TOKEN }}
- -
name: Log in to GitHub Container registry name: Log in to GitHub Container registry
if: github.event_name != 'pull_request' if: github.event_name != 'pull_request'
@ -111,16 +110,27 @@ jobs:
registry: ghcr.io registry: ghcr.io
username: ${{ github.actor }} username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }} password: ${{ secrets.GITHUB_TOKEN }}
- -
name: Build artifacts name: Build artifacts
uses: docker/bake-action@v2 uses: docker/bake-action@v4
with: with:
targets: artifact-all targets: artifact-all
- -
name: Move artifacts name: Rename provenance
run: |
for pdir in ./bin/*/; do
(
cd "$pdir"
binname=$(find . -name '*.tar.gz')
filename=$(basename "${binname%.tar.gz}")
mv "provenance.json" "${filename}.provenance.json"
)
done
-
name: Move and list artifacts
run: | run: |
mv ./bin/**/* ./bin/ mv ./bin/**/* ./bin/
tree -nh ./bin
- -
name: Upload artifacts name: Upload artifacts
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
@ -130,7 +140,7 @@ jobs:
if-no-files-found: error if-no-files-found: error
- -
name: Build image name: Build image
uses: docker/bake-action@v2 uses: docker/bake-action@v4
with: with:
files: | files: |
./docker-bake.hcl ./docker-bake.hcl
@ -145,6 +155,7 @@ jobs:
draft: true draft: true
files: | files: |
bin/*.tar.gz bin/*.tar.gz
bin/*.provenance.json
bin/*.sha256 bin/*.sha256
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View file

@ -22,7 +22,7 @@ jobs:
fetch-depth: 0 fetch-depth: 0
- -
name: Build image name: Build image
uses: docker/bake-action@v2 uses: docker/bake-action@v4
with: with:
targets: image-local targets: image-local
- -

View file

@ -30,11 +30,12 @@ jobs:
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
- name: Build docs - name: Build docs
uses: docker/bake-action@v3 uses: docker/bake-action@v4
with: with:
files: | files: |
docker-bake.hcl docker-bake.hcl
targets: docs-export targets: docs-export
provenance: false
set: | set: |
*.cache-from=type=gha,scope=docs *.cache-from=type=gha,scope=docs
*.cache-to=type=gha,scope=docs,mode=max *.cache-to=type=gha,scope=docs,mode=max

View file

@ -25,7 +25,7 @@ jobs:
fetch-depth: 0 fetch-depth: 0
- -
name: Build image name: Build image
uses: docker/bake-action@v2 uses: docker/bake-action@v4
with: with:
targets: image-local targets: image-local
- -