chore: add assertions for the forge context and use it instead of github where relevant (#748)

Refs forgejo/act#37

Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/748
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>
This commit is contained in:
Earl Warren 2025-07-06 12:15:38 +00:00 committed by earl-warren
parent 07b9318ff7
commit cd1a0f5076
No known key found for this signature in database
GPG key ID: F128CBE6AB3A7201
5 changed files with 27 additions and 8 deletions

View file

@ -12,6 +12,7 @@ runs:
test "$GITHUB_ACTION_REPOSITORY" = root/action-for-context
test "$GITHUB_ACTION_REPOSITORY" = "${{ env.GITHUB_ACTION_REPOSITORY }}"
test "$GITHUB_ACTION_REPOSITORY" = "${{ github.ACTION_REPOSITORY }}"
test "$GITHUB_ACTION_REPOSITORY" = "${{ forge.ACTION_REPOSITORY }}"
touch /srv/example/example-context/GITHUB_ACTION_REPOSITORY
- name: GITHUB_ACTION_PATH
@ -20,4 +21,5 @@ runs:
set -x
[[ "$GITHUB_ACTION_PATH" =~ action-for-context@main$ ]]
test "$GITHUB_ACTION_PATH" = "${{ github.ACTION_PATH }}"
test "$GITHUB_ACTION_PATH" = "${{ forge.ACTION_PATH }}"
touch /srv/example/example-context/GITHUB_ACTION_PATH