Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 32 additions & 2 deletions .github/workflows/ci.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,8 +9,30 @@

permissions: {}
jobs:
changes:
name: Detect code changes
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
outputs:
code: ${{ steps.filter.outputs.code }}
steps:
- uses: actions/checkout@v6.0.2
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
code:
- '**'
- '!docs/**'
- '!**/*.md'
- '!.github/workflows/docs_*.yml'

determine-image-tag:
name: Determine Image Tag
needs: changes
if: needs.changes.outputs.code == 'true'
runs-on: ubuntu-latest
permissions:
contents: read
Expand DownExpand Up@@ -39,12 +61,15 @@
echo "tag=$TAG" >> $GITHUB_OUTPUT

lint:
needs: changes
if: needs.changes.outputs.code == 'true'
permissions:
contents: read
uses: ./.github/workflows/lint.yml

docker:
needs: determine-image-tag
needs: [determine-image-tag, changes]
if: needs.changes.outputs.code == 'true'
uses: ./.github/workflows/docker-build-push.yml
secrets: inherit
permissions:
Expand All@@ -60,6 +85,8 @@
]

test:
needs: changes
if: needs.changes.outputs.code == 'true'
permissions:
actions: read
contents: read
Expand All@@ -68,7 +95,8 @@
secrets: inherit

docker-tests:
needs: [determine-image-tag, docker]
needs: [determine-image-tag, docker, changes]
if: needs.changes.outputs.code == 'true'
uses: ./.github/workflows/docker-tests.yml
secrets: inherit
permissions:
Expand All@@ -77,6 +105,8 @@
image-tag: ${{ needs.determine-image-tag.outputs.tag }}

proto:
needs: changes
if: needs.changes.outputs.code == 'true'
permissions:
contents: read
pull-requests: write
Expand Down
Loading