mirror of
https://github.com/go-gitea/gitea
synced 2024-11-18 16:14:26 +00:00
51c2aebe1f
`docker-dryrun` runs on almost any PR, which is a huge waste of CI resources. Run it only when the Dockerfiles change and also add a step that verifies the rootless file. --------- Co-authored-by: techknowlogick <techknowlogick@gitea.io>
36 lines
941 B
YAML
36 lines
941 B
YAML
name: docker-dryrun
|
|
|
|
on:
|
|
pull_request:
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
files-changed:
|
|
uses: ./.github/workflows/files-changed.yml
|
|
|
|
regular:
|
|
if: needs.files-changed.outputs.docker == 'true' || needs.files-changed.outputs.actions == 'true'
|
|
needs: files-changed
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: docker/setup-buildx-action@v2
|
|
- uses: docker/build-push-action@v4
|
|
with:
|
|
push: false
|
|
tags: gitea/gitea:linux-amd64
|
|
|
|
rootless:
|
|
if: needs.files-changed.outputs.docker == 'true' || needs.files-changed.outputs.actions == 'true'
|
|
needs: files-changed
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: docker/setup-buildx-action@v2
|
|
- uses: docker/build-push-action@v4
|
|
with:
|
|
push: false
|
|
file: Dockerfile.rootless
|
|
tags: gitea/gitea:linux-amd64
|