end-to-end/actions/example-context/action-for-context/action.yml
Earl Warren 49c2072cbe
actions: use FORGEJO_* instead of GITHUB_* and test backward compatibility (#758)
Refs forgejo/act#171
Refs actions/setup-forgejo#461

Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/758
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
2025-07-08 04:51:37 +00:00

27 lines
1,023 B
YAML

inputs:
input-one:
default: 'one'
description: 'description one'
runs:
using: "composite"
steps:
- name: FORGEJO_ACTION_REPOSITORY
run: |
set -x
test "$FORGEJO_ACTION_REPOSITORY" = root/action-for-context
test "$FORGEJO_ACTION_REPOSITORY" = "${{ env.FORGEJO_ACTION_REPOSITORY }}"
test "$FORGEJO_ACTION_REPOSITORY" = "${{ github.ACTION_REPOSITORY }}"
test "$FORGEJO_ACTION_REPOSITORY" = "${{ forge.ACTION_REPOSITORY }}"
test "$FORGEJO_ACTION_REPOSITORY" = "$GITHUB_ACTION_REPOSITORY"
touch /srv/example/example-context/FORGEJO_ACTION_REPOSITORY
- name: FORGEJO_ACTION_PATH
shell: bash
run: |
set -x
[[ "$FORGEJO_ACTION_PATH" =~ action-for-context@main$ ]]
test "$FORGEJO_ACTION_PATH" = "${{ github.ACTION_PATH }}"
test "$FORGEJO_ACTION_PATH" = "${{ forge.ACTION_PATH }}"
test "$FORGEJO_ACTION_PATH" = "$GITHUB_ACTION_PATH"
touch /srv/example/example-context/FORGEJO_ACTION_PATH