actions: add context example
This commit is contained in:
parent
c5cccca38d
commit
4768908489
8 changed files with 240 additions and 4 deletions
|
@ -33,6 +33,24 @@ jobs:
|
|||
echo value=true >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
# See also actions/example-context/.forgejo/workflows/test.yml
|
||||
- name: env.GITHUB_BASE_REF
|
||||
run: |
|
||||
set -x
|
||||
test "$GITHUB_BASE_REF" = main
|
||||
test "$GITHUB_BASE_REF" = "${{ env.GITHUB_BASE_REF }}"
|
||||
|
||||
# See also actions/example-context/.forgejo/workflows/test.yml
|
||||
- name: env.GITHUB_HEAD_REF
|
||||
run: |
|
||||
set -x
|
||||
if ${{ steps.forked.outputs.value }} ; then
|
||||
test "$GITHUB_HEAD_REF" = main
|
||||
else
|
||||
test "$GITHUB_HEAD_REF" = other
|
||||
fi
|
||||
test "$GITHUB_HEAD_REF" = "${{ env.GITHUB_HEAD_REF }}"
|
||||
|
||||
- name: secrets
|
||||
shell: bash
|
||||
run: |
|
||||
|
|
Loading…
Add table
Reference in a new issue