mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-21 01:11: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:
|
||||
task-check:
|
||||
# github.event.repository.name only contains 'GildedRose-Refactoring-Kata' (no owner)!
|
||||
# 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
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
pull-requests: write
|
||||
steps:
|
||||
- name: Determine if PR is a solution
|
||||
id: check
|
||||
uses: actions/github-script@v7
|
||||
# github.event.repository.name only contains 'GildedRose-Refactoring-Kata' (no owner)!
|
||||
# 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
|
||||
- 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:
|
||||
script: |
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
Loading…
Reference in New Issue
Block a user