Chore: Skip more GHA jobs if backend files are not changed (#109803)

This commit is contained in:
Tom Ratcliffe
2025-08-18 17:42:02 +01:00
committed by GitHub
parent 8283ba94fe
commit d542f6bcda
3 changed files with 63 additions and 5 deletions
+20 -1
View File
@@ -14,10 +14,29 @@ concurrency:
cancel-in-progress: true
jobs:
detect-changes:
name: Detect whether code changed
runs-on: ubuntu-latest
permissions:
contents: read
outputs:
changed: ${{ steps.detect-changes.outputs.backend }}
steps:
- uses: actions/checkout@v4
with:
persist-credentials: true # required to get more history in the changed-files action
fetch-depth: 2
- name: Detect changes
id: detect-changes
uses: ./.github/actions/change-detection
with:
self: .github/workflows/swagger-gen.yml
verify:
name: Verify committed API specs match
runs-on: ubuntu-latest
if: ${{ github.repository == 'grafana/grafana' }}
needs: detect-changes
if: github.repository == 'grafana/grafana' && needs.detect-changes.outputs.changed == 'true'
permissions:
contents: read # clone the repository
id-token: write # required for Vault access