Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gitea Actions Print gitea.actor Value Which Are Different from GitHub Action in Special Circumstances #33022

Open
dangjinghao opened this issue Dec 28, 2024 · 1 comment
Labels
topic/gitea-actions related to the actions of Gitea type/bug

Comments

@dangjinghao
Copy link

Description

when a cron workflow is triggered, the {{ gitea.actor }} whould be replaced with gitea-actions but github action would print the username who set the trigger.

Gitea Version

1.22.6

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

gitea
github

Git Version

No response

Operating System

No response

How are you running Gitea?

workflow configuration

name: cron
on:
  schedule:
    - cron: "*/2 * * * *"
env:
  TZ: Asia/Shanghai

jobs:
  echo:
    runs-on: ubuntu-latest
    steps:
    - name: test
      run: |
        echo ${{ github.actor }}        

gitea:1.22.6, running in docker container, image: gitea/gitea:latest
gitea-runner version: v0.2.11, running in docker container, image: gitea/act_runner:latest

Database

None

@lunny lunny added this to the 1.23.0 milestone Dec 29, 2024
@kemzeb kemzeb added the topic/gitea-actions related to the actions of Gitea label Dec 29, 2024
@Zettat123
Copy link
Contributor

In fact, this is by design. The reason is that in some cases Gitea cannot get the actor when creating schedule tasks (see #30581).

I checked the GitHub documentation and found that GitHub may require users to alter the cron to reactivate the scheduled workflow. Indeed, the actor can always be recorded in this way. But I'm not sure if we should do this as it requires users to do more operations to activate/reactivate the workflow.

@lunny lunny removed this from the 1.23.0 milestone Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic/gitea-actions related to the actions of Gitea type/bug
Projects
None yet
Development

No branches or pull requests

4 participants