Skip to content

Commit

Permalink
feat: label PR on CI fail (WIP) (TheAlgorithms#2455)
Browse files Browse the repository at this point in the history
* feat: label PR on CI fail

* updating DIRECTORY.md

---------

Co-authored-by: github-actions[bot] <github-actions@users.noreply.github.com>
  • Loading branch information
Panquesito7 and github-actions[bot] authored May 20, 2023
1 parent 4f4585d commit 0934ec4
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions .github/workflows/awesome_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,26 @@ jobs:
name: Compile checks
runs-on: ${{ matrix.os }}
needs: [MainSequence]
permissions:
pull-requests: write
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- uses: actions/checkout@v3
with:
submodules: true
- run: cmake -B ./build -S .
- run: cmake --build build
- run: |
cmake -B ./build -S .
cmake --build build
- name: Label on PR fail
uses: actions/github-script@v6
if: ${{ failure() && matrix.os == 'ubuntu-latest' && github.event_name == 'pull_request' }}
with:
script: |
github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ['automated tests are failing']
})

0 comments on commit 0934ec4

Please sign in to comment.