mirror of
https://github.com/docker/docs.git
synced 2026-04-03 01:38:58 +07:00
101 lines
2.4 KiB
YAML
101 lines
2.4 KiB
YAML
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:
|
|
|
|
permissions:
|
|
contents: read # to fetch code (actions/checkout)
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-24.04
|
|
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
|
|
with:
|
|
files: |
|
|
docker-bake.hcl
|
|
targets: release
|
|
set: |
|
|
*.cache-from=type=gha,scope=build
|
|
*.cache-to=type=gha,scope=build,mode=max
|
|
|
|
vale:
|
|
if: ${{ github.event_name == 'pull_request' }}
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: errata-ai/vale-action@reviewdog
|
|
env:
|
|
PIP_BREAK_SYSTEM_PACKAGES: 1
|
|
with:
|
|
files: content
|
|
|
|
validate:
|
|
runs-on: ubuntu-24.04
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
target:
|
|
- lint
|
|
- test
|
|
- unused-media
|
|
- test-go-redirects
|
|
- 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
|
|
with:
|
|
files: |
|
|
docker-bake.hcl
|
|
targets: ${{ matrix.target }}
|
|
set: |
|
|
*.cache-to=type=gha,scope=validate-${{ matrix.target }},mode=max
|
|
*.cache-from=type=gha,scope=validate-${{ matrix.target }}
|
|
*.cache-from=type=gha,scope=build
|
|
|
|
# build-releaser builds the _releaser used for AWS deployment in publish workflow.
|
|
# It's just to be sure it builds correctly.
|
|
build-releaser:
|
|
runs-on: ubuntu-24.04
|
|
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
|
|
with:
|
|
files: |
|
|
docker-bake.hcl
|
|
targets: releaser-build
|
|
set: |
|
|
*.cache-from=type=gha,scope=releaser
|
|
*.cache-to=type=gha,scope=releaser,mode=max
|