actions: add context example
This commit is contained in:
parent
c5cccca38d
commit
4768908489
8 changed files with 240 additions and 4 deletions
21
actions/example-context/action-for-context/action.yml
Normal file
21
actions/example-context/action-for-context/action.yml
Normal file
|
@ -0,0 +1,21 @@
|
|||
inputs:
|
||||
input-one:
|
||||
default: 'one'
|
||||
description: 'description one'
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: GITHUB_ACTION_REPOSITORY
|
||||
run: |
|
||||
set -x
|
||||
test "$GITHUB_ACTION_REPOSITORY" = root/action-for-context
|
||||
test "$GITHUB_ACTION_REPOSITORY" = "${{ env.GITHUB_ACTION_REPOSITORY }}"
|
||||
touch /srv/example/example-context/GITHUB_ACTION_REPOSITORY
|
||||
|
||||
- name: GITHUB_ACTION_PATH
|
||||
shell: bash
|
||||
run: |
|
||||
set -x
|
||||
[[ "$GITHUB_ACTION_PATH" =~ action-for-context@main$ ]]
|
||||
touch /srv/example/example-context/GITHUB_ACTION_PATH
|
Loading…
Add table
Reference in a new issue