mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-10-15 19:42:06 +00:00
fix #134 - include base_ref and head_ref in github context from the event json
This commit is contained in:
parent
8f6d32db71
commit
cc19e1e341
5 changed files with 100 additions and 3 deletions
10
act/runner/testdata/pull-request/event.json
vendored
Normal file
10
act/runner/testdata/pull-request/event.json
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"pull_request": {
|
||||
"head": {
|
||||
"ref": "sample-head-ref"
|
||||
},
|
||||
"base": {
|
||||
"ref": "sample-base-ref"
|
||||
}
|
||||
}
|
||||
}
|
10
act/runner/testdata/pull-request/main.yaml
vendored
Normal file
10
act/runner/testdata/pull-request/main.yaml
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
name: basic
|
||||
on: pull_request
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: echo '${{github.ref}}'
|
||||
- run: echo '${{github.head_ref}}' | grep sample-head-ref
|
||||
- run: echo '${{github.base_ref}}' | grep sample-base-ref
|
Loading…
Add table
Add a link
Reference in a new issue