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>
This commit is contained in:
Earl Warren 2025-07-08 04:51:37 +00:00 committed by earl-warren
parent f0eadf960b
commit 49c2072cbe
No known key found for this signature in database
GPG key ID: F128CBE6AB3A7201
2 changed files with 140 additions and 116 deletions

View file

@ -6,20 +6,22 @@ inputs:
runs:
using: "composite"
steps:
- name: GITHUB_ACTION_REPOSITORY
- name: FORGEJO_ACTION_REPOSITORY
run: |
set -x
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
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: GITHUB_ACTION_PATH
- name: FORGEJO_ACTION_PATH
shell: bash
run: |
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
[[ "$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