mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-06-16 05:13:58 -07:00
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:
parent
83674e1d1b
commit
416ba3fc2b
2 changed files with 5 additions and 4 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in a new issue