diff options
author | Nadrieril | 2024-04-22 13:50:09 +0200 |
---|---|---|
committer | Nadrieril | 2024-04-22 13:58:11 +0200 |
commit | e79e1d1aba6f6e2ff2517cd12b464f15899926da (patch) | |
tree | fa537e93d03a5bfbbdf0e6595fa7deaef53b8730 | |
parent | 1e2fce0e1fa42fa2ba5800332e1fdfcba2294657 (diff) |
ci: avoid running duplicate jobs
-rw-r--r-- | .github/workflows/ci.yml | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6b5aacf0..86b5b300 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,10 +4,29 @@ on: pull_request: workflow_dispatch: +# Minimum permissions required by skip-duplicate-actions +permissions: + actions: write + contents: read + jobs: + # Avoid `push` and `pull_request` running the same job twice + check_if_skip_duplicate_job: + runs-on: [self-hosted, linux, nix] + steps: + - id: skip_check + uses: fkirc/skip-duplicate-actions@v5 + with: + concurrent_skipping: 'same_content_newer' + skip_after_successful_duplicate: 'true' + outputs: + should_skip: ${{ steps.skip_check.outputs.should_skip }} + nix: #runs-on: ubuntu-latest runs-on: [self-hosted, linux, nix] + needs: check_if_skip_duplicate_job + if: needs.check_if_skip_duplicate_job.outputs.should_skip != 'true' steps: #- uses: cachix/install-nix-action@v22 - uses: actions/checkout@v4 @@ -18,8 +37,11 @@ jobs: - run: nix build -L .#checks.x86_64-linux.aeneas-verify-hol4 # Lean doesn't work with Nix #- run: nix build -L .#checks.x86_64-linux.aeneas-verify-lean + lean: # Lean isn't supported by Nix, so we put it in a different job runs-on: [ubuntu-latest] + needs: check_if_skip_duplicate_job + if: needs.check_if_skip_duplicate_job.outputs.should_skip != 'true' steps: # Install curl - run: sudo apt update && sudo apt install curl |