fix: replace gitea.sha and gitea.event_name with github.sha and github.event_name in CI workflow #243
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
The CI workflow at
.gitea/workflows/build.yamluses Gitea-specific context variables that do not exist in Gitea Actions (which mimics the GitHub Actions context API):Gitea Actions uses the
github.*context (notgitea.*). The correct expressions are:github.event_name— notgitea.event_namegithub.sha— notgitea.shaWhat to do
In
.gitea/workflows/build.yaml:Replace
gitea.event_namewithgithub.event_name:Replace
gitea.shawithgithub.sha:Commit and push to
master. Verify the workflow triggers and the build job correctly skips on PRs (event_name == pull_request).Acceptance Criteria
.gitea/workflows/build.yamlusesgithub.event_nameandgithub.shaReferences