ci: update bake-action to v6 (#4554)

This commit is contained in:
Milos Gajdos 2025-01-10 10:06:22 +00:00 committed by GitHub
commit 9dff0cbf9f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 13 additions and 20 deletions

View File

@ -66,11 +66,6 @@ jobs:
needs: needs:
- test - test
steps: steps:
-
name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- -
name: Docker meta name: Docker meta
id: meta id: meta
@ -118,7 +113,7 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }} password: ${{ secrets.GITHUB_TOKEN }}
- -
name: Build artifacts name: Build artifacts
uses: docker/bake-action@v5 uses: docker/bake-action@v6
with: with:
targets: artifact-all targets: artifact-all
- -
@ -146,11 +141,11 @@ jobs:
if-no-files-found: error if-no-files-found: error
- -
name: Build image name: Build image
uses: docker/bake-action@v5 uses: docker/bake-action@v6
with: with:
files: | files: |
./docker-bake.hcl ./docker-bake.hcl
${{ steps.meta.outputs.bake-file }} cwd://${{ steps.meta.outputs.bake-file }}
targets: image-all targets: image-all
push: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') }} push: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') }}
- -

View File

@ -15,14 +15,9 @@ jobs:
run-conformance-test: run-conformance-test:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
-
name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- -
name: Build image name: Build image
uses: docker/bake-action@v5 uses: docker/bake-action@v6
with: with:
targets: image-local targets: image-local
- -

View File

@ -13,6 +13,7 @@ on:
- dockerfiles/docs.Dockerfile - dockerfiles/docs.Dockerfile
- docs/** - docs/**
workflow_dispatch: workflow_dispatch:
pull_request:
jobs: jobs:
# Build job # Build job
@ -22,28 +23,28 @@ jobs:
contents: read contents: read
# Build the site and upload artifacts using actions/upload-pages-artifact # Build the site and upload artifacts using actions/upload-pages-artifact
steps: steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages - name: Setup Pages
id: pages id: pages
uses: actions/configure-pages@v5 uses: actions/configure-pages@v5
- 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@v5 uses: docker/bake-action@v6
with: with:
files: |
docker-bake.hcl
targets: docs-export targets: docs-export
provenance: false 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
- name: Fix permissions - name: Fix permissions
run: | run: |
chmod -c -R +rX "./build/docs" | while read line; do chmod -c -R +rX "./build/docs" | while read line; do
echo "::warning title=Invalid file permissions automatically fixed::$line" echo "::warning title=Invalid file permissions automatically fixed::$line"
done done
- name: Upload Pages artifact - name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3 uses: actions/upload-pages-artifact@v3
with: with:
@ -51,6 +52,7 @@ jobs:
# Deploy job # Deploy job
deploy: deploy:
if: github.event_name != 'pull_request'
# Add a dependency to the build job # Add a dependency to the build job
needs: build needs: build

View File

@ -25,8 +25,9 @@ jobs:
fetch-depth: 0 fetch-depth: 0
- -
name: Build image name: Build image
uses: docker/bake-action@v5 uses: docker/bake-action@v6
with: with:
source: .
targets: image-local targets: image-local
- -
name: Start distribution server name: Start distribution server