Use action name for conditionals

This commit is contained in:
Christopher C. Wells 2022-11-05 21:33:17 -07:00
parent 0cae86773a
commit eae11b5f63
1 changed files with 2 additions and 12 deletions

View File

@ -5,22 +5,12 @@ on:
pull_request:
types: [labeled, unlabeled]
jobs:
dump-contexts-to-log:
runs-on: ubuntu-latest
steps:
- name: Dump GitHub context
id: github_context_step
run: echo '${{ toJSON(github) }}'
- name: Dump job context
run: echo '${{ toJSON(job) }}'
- name: Dump steps context
run: echo '${{ toJSON(steps) }}'
create-review-app:
runs-on: ubuntu-latest
environment:
name: pr-${{ github.event.pull_request.number }}
url: https://pr-${{ github.event.pull_request.number }}.dokku.baby-buddy.net
if: github.event_name == 'labeled' && github.event.label.name == 'to review'
if: github.event.action == 'labeled' && github.event.label.name == 'to review'
steps:
- uses: actions/checkout@v3
with:
@ -37,7 +27,7 @@ jobs:
environment:
name: pr-${{ github.event.pull_request.number }}
url: https://pr-${{ github.event.pull_request.number }}.dokku.baby-buddy.net
if: github.event_name == 'unlabeled' && github.event.label.name == 'to review'
if: github.event.action == 'unlabeled' && github.event.label.name == 'to review'
steps:
- name: Destroy review app
uses: dokku/github-action@master