mirror of
https://github.com/go-gitea/gitea.git
synced 2026-05-05 21:44:57 +00:00
1. only trigger docker-dryrun arm64&riscv64 when dockerfile changes 2. de-duplicate "contents: read" permission for most workflows 3. merge various "lint-*" jobs into one job 4. add missing lint targets to the "lint" (all) target
48 lines
1.3 KiB
YAML
48 lines
1.3 KiB
YAML
name: docker-dryrun
|
|
|
|
on:
|
|
pull_request:
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
|
cancel-in-progress: true
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
files-changed:
|
|
uses: ./.github/workflows/files-changed.yml
|
|
|
|
# QEMU-based build is slow (40-50 minutes), so run arm64 and riscv64 when dockerfile changes.
|
|
# Run amd64 when any docker-related files change, which is fast (4 minutes).
|
|
container-amd64:
|
|
if: needs.files-changed.outputs.docker == 'true'
|
|
needs: [files-changed]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
- uses: ./.github/actions/docker-dryrun
|
|
with:
|
|
platform: linux/amd64
|
|
|
|
container-arm64:
|
|
if: needs.files-changed.outputs.dockerfile == 'true'
|
|
needs: [files-changed]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
- uses: ./.github/actions/docker-dryrun
|
|
with:
|
|
platform: linux/arm64
|
|
|
|
container-riscv64:
|
|
if: needs.files-changed.outputs.dockerfile == 'true'
|
|
needs: [files-changed]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
- uses: ./.github/actions/docker-dryrun
|
|
with:
|
|
platform: linux/riscv64
|