Skip to content

Commit

Permalink
test push env
Browse files Browse the repository at this point in the history
  • Loading branch information
doofus-01 committed Aug 25, 2024
1 parent 50ce1c3 commit 67f88f9
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions .github/workflows/check_metadata.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Image metadata check CI

on:
# push:
# branches: [master]
push:
branches: [master]
pull_request:
paths:
- '**.webp'
Expand All @@ -18,11 +18,6 @@ jobs:
contents: read
pull-requests: write

env:
# figured this out from here: https://docs.github.com/en/webhooks/webhook-events-and-payloads?actionType=edited#pull_request
SHA: ${{ github.event.pull_request.head.sha }}
BASE_SHA: ${{ github.event.pull_request.base.sha }}

steps:
- name: exiftool installation
run: |
Expand All @@ -34,6 +29,21 @@ jobs:
# this makes the HEAD be the last commit on the PR, not the merge commit, so wrong older commits would get buried
# ref: ${{ github.event.pull_request.head.sha }}

- name: PR env setup
if: ${{ github.event_name == 'pull_request' }}
env:
# figured this out from here: https://docs.github.com/en/webhooks/webhook-events-and-payloads?actionType=edited#pull_request
SHA: ${{ github.event.pull_request.head.sha }}
BASE_SHA: ${{ github.event.pull_request.base.sha }}
run: echo SHA is $SHA

- name: push env setup
if: ${{ github.event_name == 'push' }}
env:
SHA: ${{ github.event.push.after }}
BASE_SHA: ${{ github.event.push.before }}
run: echo SHA is $SHA

- name: read/export image metadata
# -id: image_check
run: |
Expand Down

0 comments on commit 67f88f9

Please sign in to comment.