Skip to content

Commit

Permalink
update invalidations job
Browse files Browse the repository at this point in the history
  • Loading branch information
t-bltg committed Oct 12, 2024
1 parent 745bce3 commit 5458e97
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions .github/workflows/invalidations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ concurrency:
cancel-in-progress: true

jobs:
check:
evaluate:
if: github.base_ref == github.event.repository.default_branch
runs-on: ubuntu-latest
steps:
- uses: julia-actions/setup-julia@latest
Expand All @@ -23,19 +24,15 @@ jobs:

- uses: actions/checkout@v4
with:
ref: 'main'
ref: ${{ github.event.repository.default_branch }}
- uses: julia-actions/julia-buildpkg@latest
- uses: julia-actions/julia-invalidations@v1
id: invs_main
id: invs_default

- name: Report invalidation counts
run: |
echo "Invalidations on main: ${{ steps.invs_main.outputs.total }} (${{ steps.invs_main.outputs.deps }} via deps)"
echo "This branch: ${{ steps.invs_pr.outputs.total }} (${{ steps.invs_pr.outputs.deps }} via deps)"
shell: bash
echo "Invalidations on default branch: ${{ steps.invs_default.outputs.total }} (${{ steps.invs_default.outputs.deps }} via deps)" >> $GITHUB_STEP_SUMMARY
echo "This branch: ${{ steps.invs_pr.outputs.total }} (${{ steps.invs_pr.outputs.deps }} via deps)" >> $GITHUB_STEP_SUMMARY
- name: PR doesn't increase number of invalidations
run: |
if (( ${{ steps.invs_pr.outputs.total }} > ${{ steps.invs_main.outputs.total }} )); then
exit 1
fi
shell: bash
if: steps.invs_pr.outputs.total > steps.invs_default.outputs.total
run: exit 1

0 comments on commit 5458e97

Please sign in to comment.