Detect changes when rendering graphs and auto-commit

pull/1953/head
Simon Marquis 2 weeks ago
parent 5e34fb49c0
commit 175164f76f

@ -77,6 +77,35 @@ jobs:
disable_globbing: true disable_globbing: true
commit_message: "🤖 Updates baselines for Dependency Guard" commit_message: "🤖 Updates baselines for Dependency Guard"
- name: Update Graphs
run: ./gradlew updateGraph
- name: Check Graphs
id: graphs_verify
run: git add -- '**/README.md' && git diff --cached --quiet --exit-code -- '**/README.md'
- name: Prevent updating graphs if this is a fork
id: checkfork_graphs
continue-on-error: false
if: steps.graphs_verify.outcome == 'failure' && github.event.pull_request.head.repo.full_name != github.repository
run: |
echo "::error::Check Graphs failed, please update graphs with: ./gradlew updateGraph" && exit 1
# Runs if previous job failed
- name: Generate new Dependency Guard baselines if verification failed and it's a PR
id: dependencyguard_baseline
if: steps.dependencyguard_verify.outcome == 'failure' && github.event_name == 'pull_request'
run: |
./gradlew dependencyGuardBaseline
- name: Push new graphs if available
if: steps.graphs_verify.outcome == 'failure' && github.event_name == 'pull_request'
uses: stefanzweifel/git-auto-commit-action@v5
with:
file_pattern: '**/README.md'
disable_globbing: true
commit_message: "🤖 Updates graphs"
- name: Run all local screenshot tests (Roborazzi) - name: Run all local screenshot tests (Roborazzi)
id: screenshotsverify id: screenshotsverify
continue-on-error: true continue-on-error: true

Loading…
Cancel
Save