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: pull_request:
types: [labeled, unlabeled] types: [labeled, unlabeled]
jobs: 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: create-review-app:
runs-on: ubuntu-latest runs-on: ubuntu-latest
environment: environment:
name: pr-${{ github.event.pull_request.number }} name: pr-${{ github.event.pull_request.number }}
url: https://pr-${{ github.event.pull_request.number }}.dokku.baby-buddy.net 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: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:
@ -37,7 +27,7 @@ jobs:
environment: environment:
name: pr-${{ github.event.pull_request.number }} name: pr-${{ github.event.pull_request.number }}
url: https://pr-${{ github.event.pull_request.number }}.dokku.baby-buddy.net 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: steps:
- name: Destroy review app - name: Destroy review app
uses: dokku/github-action@master uses: dokku/github-action@master