Build Docker images locally when Dockerfiles change
#3
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Pull Request CI | |
| on: | |
| workflow_dispatch: # Allow manual triggering | |
| pull_request: # Trigger on all pull requests | |
| paths: | |
| - 'skiko/**' | |
| - '.github/workflows/**' | |
| jobs: | |
| check-docker-changes: | |
| name: 'Check Docker Changes' | |
| runs-on: ubuntu-24.04 | |
| outputs: | |
| docker-changed: ${{ steps.filter.outputs.docker }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| name: 'Check out code' | |
| - uses: dorny/paths-filter@v3 | |
| id: filter | |
| with: | |
| filters: | | |
| docker: | |
| - 'skiko/docker/**' | |
| - '.github/workflows/docker-publish.yml' | |
| docker-publish: | |
| name: 'Docker Publish (Dry Run)' | |
| needs: check-docker-changes | |
| if: needs.check-docker-changes.outputs.docker-changed == 'true' | |
| uses: ./.github/workflows/docker-publish.yml | |
| with: | |
| publish: false | |
| permissions: | |
| contents: read | |
| packages: write | |
| tests: | |
| name: 'Tests' | |
| needs: check-docker-changes | |
| uses: ./.github/workflows/tests.yml | |
| with: | |
| build-docker: ${{ needs.check-docker-changes.outputs.docker-changed == 'true' }} | |
| publish-dry-run: | |
| name: 'Publish Dry Run' | |
| needs: check-docker-changes | |
| uses: ./.github/workflows/publish-dry-run.yml | |
| with: | |
| build-docker: ${{ needs.check-docker-changes.outputs.docker-changed == 'true' }} | |
| docs: | |
| name: 'Documentation' | |
| needs: check-docker-changes | |
| uses: ./.github/workflows/docs.yml | |
| with: | |
| build-docker: ${{ needs.check-docker-changes.outputs.docker-changed == 'true' }} |