Skip to content

add usage examples for building Bake files from remote Git and HTTP sources, and Raw HTTPS #17535

add usage examples for building Bake files from remote Git and HTTP sources, and Raw HTTPS

add usage examples for building Bake files from remote Git and HTTP sources, and Raw HTTPS #17535

Workflow file for this run

name: build
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
push:
# needs push event on default branch otherwise cache is evicted when pull request is merged
branches:
- main
pull_request:
env:
# Use edge release of buildx (latest RC, fallback to latest stable)
SETUP_BUILDX_VERSION: edge
SETUP_BUILDKIT_IMAGE: "moby/buildkit:latest"
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
releaser:
runs-on: ubuntu-24.04
steps:
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
version: ${{ env.SETUP_BUILDX_VERSION }}
driver-opts: image=${{ env.SETUP_BUILDKIT_IMAGE }}
-
name: Build
uses: docker/bake-action@v6
with:
files: |
docker-bake.hcl
targets: releaser-build
build:
runs-on: ubuntu-24.04
needs:
- releaser
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Build
uses: docker/bake-action@v6
with:
source: .
files: |
docker-bake.hcl
targets: release
-
name: Check Cloudfront config
uses: docker/bake-action@v6
with:
source: .
targets: aws-cloudfront-update
env:
DRY_RUN: true
AWS_REGION: us-east-1
AWS_CLOUDFRONT_ID: 0123456789ABCD
AWS_LAMBDA_FUNCTION: DockerDocsRedirectFunction-dummy
validate:
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
target:
- lint
- vale
- test
- unused-media
- test-go-redirects
- dockerfile-lint
- path-warnings
- validate-vendor
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Validate
uses: docker/bake-action@v6
with:
source: .
files: |
docker-bake.hcl
targets: ${{ matrix.target }}
-
name: Install reviewdog
if: ${{ matrix.target == 'vale' && github.event_name == 'pull_request' }}
uses: reviewdog/action-setup@e04ffabe3898a0af8d0fb1af00c188831c4b5893 # v1.3.2
-
name: Run reviewdog for vale
if: ${{ matrix.target == 'vale' && github.event_name == 'pull_request' }}
run: |
cat ./tmp/vale.out | reviewdog -f=rdjsonl -name=vale -reporter=github-pr-annotations -fail-on-error=false -filter-mode=added -level=info
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}