mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-21 09:21:08 +00:00
Github-Action: Moved gurad clause from job to step level
This commit is contained in:
parent
7081069861
commit
5a11c5ce48
22
.github/workflows/pr-validation.yml
vendored
22
.github/workflows/pr-validation.yml
vendored
@ -5,19 +5,23 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
task-check:
|
task-check:
|
||||||
# github.event.repository.name only contains 'GildedRose-Refactoring-Kata' (no owner)!
|
runs-on: ubuntu-latest
|
||||||
# we could check owner and name if: github.repository == 'emilybache/GildedRose-Refactoring-Kata'
|
|
||||||
# but checking owner is enough/better/more stable
|
|
||||||
# Only run from the base repository
|
|
||||||
if: ${{ github.repository_owner == 'emilybache' || env.FORK_TESTING == 'true' }}
|
|
||||||
runs-on: ubuntu-slim
|
|
||||||
permissions:
|
permissions:
|
||||||
issues: write
|
issues: write
|
||||||
pull-requests: write
|
pull-requests: write
|
||||||
steps:
|
steps:
|
||||||
- name: Determine if PR is a solution
|
# github.event.repository.name only contains 'GildedRose-Refactoring-Kata' (no owner)!
|
||||||
id: check
|
# we could check owner and name if: github.repository == 'emilybache/GildedRose-Refactoring-Kata'
|
||||||
uses: actions/github-script@v7
|
# but checking owner is enough/better/more stable
|
||||||
|
# Only run from the base repository
|
||||||
|
- name: Skip if not main repo or fork testing
|
||||||
|
if: ${{ github.repository_owner != 'emilybache' && env.PR_TESTING != 'true' }}
|
||||||
|
run: |
|
||||||
|
echo "Skipping workflow on fork without PR_TESTING"
|
||||||
|
exit 0
|
||||||
|
- name: Comment if checkmark is missing
|
||||||
|
if: ${{ !contains(github.event.pull_request.body, '[X] I acknowledge') }}
|
||||||
|
uses: actions/github-script@v6
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user