Skip to content

Commit

Permalink
Merge pull request #26 from bogdanalexe90/patch-1
Browse files Browse the repository at this point in the history
Update pr.yml
  • Loading branch information
aesqe authored Sep 9, 2021
2 parents 12601d1 + 5781832 commit 92add1e
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ on:
sha:
description: 'SHA of the latest commit'
required: true

concurrency:
group: test-${{ github.event_name == 'workflow_dispatch' && github.event.inputs.prRef || github.ref }}
cancel-in-progress: true

env:
PR_REF: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.prRef || github.ref }}
PR_NUMBER: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.prNumber || github.event.number }}
Expand All @@ -26,12 +31,43 @@ jobs:
timeout-minutes: 45

steps:
- name: Set initial check status
uses: niteoweb/[email protected]
with:
pr_number: ${{ env.PR_NUMBER }}
state: pending
repository: ${{ github.repository }}
context: 'test / Build image'
target_url: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}

- name: Dump context
uses: crazy-max/ghaction-dump-context@v1

- name: test
run: |
echo ${{ env.PR_REF }}
echo ${{ env.PR_NUMBER }}
echo ${{ env.SHA }}
echo ${{ github.event }}
echo ${{ github.event.inputs }}
- name: Set success or failure status
uses: niteoweb/[email protected]
if: ${{ success() || failure() }}
with:
pr_number: ${{ env.PR_NUMBER }}
state: ${{ job.status }}
repository: ${{ github.repository }}
context: 'test / Build image'
target_url: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}

- name: Set error status
uses: niteoweb/[email protected]
if: ${{ cancelled() }}
with:
pr_number: ${{ env.PR_NUMBER }}
state: error
repository: ${{ github.repository }}
context: 'test / Build image'
target_url: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}

0 comments on commit 92add1e

Please sign in to comment.