forked from mirrors/0ad
Fix Gitea actions syntax on push events
The Github documentation is difficult to parse, but there is an asymmetry in the API: - for a PR event, the event object contains a `pull_request` object containing `base` and `head` objects - for a push event, the `before` and `after` SHAs are immediate children of the event object <https://docs.github.com/en/webhooks/webhook-events-and-payloads> Fixes #7730.
This commit is contained in:
@@ -4,8 +4,8 @@ on:
|
||||
- push
|
||||
- pull_request
|
||||
env:
|
||||
BASE_SHA: ${{ github.event.pull_request.base.sha || github.event.push.before }}
|
||||
HEAD_SHA: ${{ github.event.pull_request.head.sha || github.event.push.after }}
|
||||
BASE_SHA: ${{ github.event.pull_request.base.sha || github.event.before }}
|
||||
HEAD_SHA: ${{ github.event.pull_request.head.sha || github.event.after }}
|
||||
|
||||
jobs:
|
||||
lfscheck:
|
||||
|
||||
@@ -2,10 +2,11 @@
|
||||
# yamllint disable rule:line-length
|
||||
name: lint
|
||||
on:
|
||||
- push
|
||||
- pull_request
|
||||
env:
|
||||
BASE_SHA: ${{ github.event.pull_request.base.sha }}
|
||||
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
|
||||
BASE_SHA: ${{ github.event.pull_request.base.sha || github.event.before }}
|
||||
HEAD_SHA: ${{ github.event.pull_request.head.sha || github.event.after }}
|
||||
|
||||
jobs:
|
||||
cppcheck:
|
||||
|
||||
Reference in New Issue
Block a user