Act runner doesn't trigger the event #10970

Closed
opened 2025-11-02 09:23:38 -06:00 by GiteaMirror · 7 comments
Owner

Originally created by @kamzata on GitHub (Jun 6, 2023).

Originally assigned to: @Zettat123 on GitHub.

Description

I'm using Dokku and I'm trying to set up a CI/CD with Gitea. I implemented the Gitea actions following this article with act_runner version v0.1.8 and I tried to use the github-actions for Dokku. Therefore I created a simple workflow and it worked great. Then I created a review-app workflow as in this example which create and deploy an app on every pull request and here I find a issue: the app is correctly created on the pull request but it doesn't be destroyed when the pull request is closed or merged.

The act_runner logs says:

[deploy-on-pr/destroy_review_app] [DEBUG] evaluating expression 'github.event_name == 'pull_request' && github.event.action == 'closed''
[deploy-on-pr/destroy_review_app] [DEBUG] expression 'github.event_name == 'pull_request' && github.event.action == 'closed'' evaluated to 'false'
[deploy-on-pr/destroy_review_app] [DEBUG] Skipping job 'destroy_review_app' due to 'github.event_name == 'pull_request' && github.event.action == 'closed''

and when I'm closing the pull request nothing happen and even the act_runner logs don't add anything.

I talked with a dokku/github-action maintainer and he says it works using Github.

Gitea Version

Gitea version 1.19.3 built with GNU Make 4.1, go1.20.4 : bindata, sqlite, sqlite_unlock_notify

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

git version 2.34.1

Operating System

No response

How are you running Gitea?

act_runner version v0.1.8

Database

None

Originally created by @kamzata on GitHub (Jun 6, 2023). Originally assigned to: @Zettat123 on GitHub. ### Description I'm using [Dokku](https://dokku.com/) and I'm trying to set up a CI/CD with Gitea. I implemented the Gitea actions [following this article](https://blog.gitea.io/2023/03/hacking-on-gitea-actions/) with [act_runner version v0.1.8](https://dl.gitea.com/act_runner/) and I tried to use the [github-actions for Dokku](https://github.com/dokku/github-action). Therefore I created [a simple workflow](https://github.com/dokku/github-action/blob/master/example-workflows/simple.yml) and it worked great. Then I created a [review-app workflow as in this example](https://github.com/dokku/github-action/blob/master/example-workflows/review-app.yml) which create and deploy an app on every `pull request` and here I find a issue: the app is correctly created on the pull request but it doesn't be destroyed when the pull request is closed or merged. The act_runner logs says: ``` [deploy-on-pr/destroy_review_app] [DEBUG] evaluating expression 'github.event_name == 'pull_request' && github.event.action == 'closed'' [deploy-on-pr/destroy_review_app] [DEBUG] expression 'github.event_name == 'pull_request' && github.event.action == 'closed'' evaluated to 'false' [deploy-on-pr/destroy_review_app] [DEBUG] Skipping job 'destroy_review_app' due to 'github.event_name == 'pull_request' && github.event.action == 'closed'' ``` and when I'm closing the pull request nothing happen and even the act_runner logs don't add anything. I talked with a [dokku/github-action](https://github.com/dokku/github-action) maintainer and he says it works using Github. ### Gitea Version Gitea version 1.19.3 built with GNU Make 4.1, go1.20.4 : bindata, sqlite, sqlite_unlock_notify ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version git version 2.34.1 ### Operating System _No response_ ### How are you running Gitea? act_runner version v0.1.8 ### Database None
GiteaMirror added the topic/gitea-actionstype/bug labels 2025-11-02 09:23:38 -06:00
Author
Owner

@lunny commented on GitHub (Jun 6, 2023):

The default on:pull_request only trigger open, reopen, sync and I think it's the same as what Github does.

@lunny commented on GitHub (Jun 6, 2023): The default `on:pull_request` only trigger `open`, `reopen`, `sync` and I think it's the same as what Github does.
Author
Owner

@Zettat123 commented on GitHub (Jun 6, 2023):

Duplicate with act_runner #229

@Zettat123 commented on GitHub (Jun 6, 2023): Duplicate with [act_runner #229](https://gitea.com/gitea/act_runner/issues/229)
Author
Owner

@kamzata commented on GitHub (Jun 6, 2023):

The default on:pull_request only trigger open, reopen, sync and I think it's the same as what Github does.

Thanks but it didn't work. Nothing's changed. Same act_runner logs and same result.

---
name: 'deploy'

# yamllint disable-line rule:truthy
on:
  # onl run this workflow on pull request events
  pull_request:
      types: [opened, closed]

jobs:
  review_app:
    runs-on: ubuntu-latest
    # only run when a pull request is opened
    if: github.event_name == 'pull_request' && github.event.action == 'opened'
    steps:
      - name: Cloning repo
        uses: actions/checkout@v3
        with:
          fetch-depth: 0

      - name: Push to dokku
        uses: dokku/github-action@master
        with:
          # create a review app
          command: review-apps:create
          git_remote_url: 'ssh://dokku@dokku.me:22/appname'
          # specify a name for the review app
          review_app_name: review-appname-${{ github.event.pull_request.number }}
          ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }}

  destroy_review_app:
    runs-on: ubuntu-latest
    # only run when a pull request is closed
    if: github.event_name == 'pull_request' && github.event.action == 'closed'
    steps:
      - name: Destroy the review app
        uses: dokku/github-action@master
        with:
          # destroy a review app
          command: review-apps:destroy
          git_remote_url: 'ssh://dokku@dokku.me:22/appname'
          # specify a name for the review app
          review_app_name: review-appname-${{ github.event.pull_request.number }}
          ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }}

As said, I talked with a dokku/github-action maintainer and he says the example works flawlessly using Github.

@kamzata commented on GitHub (Jun 6, 2023): > The default `on:pull_request` only trigger `open`, `reopen`, `sync` and I think it's the same as what Github does. Thanks but it didn't work. Nothing's changed. Same act_runner logs and same result. ``` --- name: 'deploy' # yamllint disable-line rule:truthy on: # onl run this workflow on pull request events pull_request: types: [opened, closed] jobs: review_app: runs-on: ubuntu-latest # only run when a pull request is opened if: github.event_name == 'pull_request' && github.event.action == 'opened' steps: - name: Cloning repo uses: actions/checkout@v3 with: fetch-depth: 0 - name: Push to dokku uses: dokku/github-action@master with: # create a review app command: review-apps:create git_remote_url: 'ssh://dokku@dokku.me:22/appname' # specify a name for the review app review_app_name: review-appname-${{ github.event.pull_request.number }} ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }} destroy_review_app: runs-on: ubuntu-latest # only run when a pull request is closed if: github.event_name == 'pull_request' && github.event.action == 'closed' steps: - name: Destroy the review app uses: dokku/github-action@master with: # destroy a review app command: review-apps:destroy git_remote_url: 'ssh://dokku@dokku.me:22/appname' # specify a name for the review app review_app_name: review-appname-${{ github.event.pull_request.number }} ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }} ``` As said, I talked with a [dokku/github-action](https://github.com/dokku/github-action) maintainer and he says [the example](https://github.com/dokku/github-action/blob/master/example-workflows/review-app.yml) works flawlessly using Github.
Author
Owner

@Zettat123 commented on GitHub (Jun 7, 2023):

Hi @kamzata , I can't reproduce this issue. The opened and closed types work fine in my tests.

Some questions:

  1. Where is the workflow file? In the base branch or the head branch?
  2. Have you tried creating a new pull request and closing it after updating the workflow file?
@Zettat123 commented on GitHub (Jun 7, 2023): Hi @kamzata , I can't reproduce this issue. The `opened` and `closed` types work fine in my tests. Some questions: 1. Where is the workflow file? In the base branch or the head branch? 2. Have you tried creating a new pull request and closing it after updating the workflow file?
Author
Owner

@kamzata commented on GitHub (Jun 7, 2023):

Hi @kamzata , I can't reproduce this issue. The opened and closed types work fine in my tests.

Some questions:

  1. Where is the workflow file? In the base branch or the head branch?
  2. Have you tried creating a new pull request and closing it after updating the workflow file?

Yes, I have. It's in the head branch (test). Is that correct?

Please, check the recording.

@kamzata commented on GitHub (Jun 7, 2023): > Hi @kamzata , I can't reproduce this issue. The `opened` and `closed` types work fine in my tests. > > Some questions: > > 1. Where is the workflow file? In the base branch or the head branch? > 2. Have you tried creating a new pull request and closing it after updating the workflow file? Yes, I have. It's in the head branch (`test`). Is that correct? Please, [check the recording](https://youtu.be/Xsn5VmfpJ5s).
Author
Owner

@Zettat123 commented on GitHub (Jun 8, 2023):

Ah, yes. Thanks for the video recording, I reproduced the issue. This is a bug from the Gitea side and I'll send a PR to fix it.

@Zettat123 commented on GitHub (Jun 8, 2023): Ah, yes. Thanks for the video recording, I reproduced the issue. This is a bug from the Gitea side and I'll send a PR to fix it.
Author
Owner

@kamzata commented on GitHub (Jun 8, 2023):

Ah, yes. Thanks for the video recording, I reproduced the issue. This is a bug from the Gitea side and I'll send a PR to fix it.

Thank you. Do you know when the fix will be available in the next Gitea package in Debian repository?

@kamzata commented on GitHub (Jun 8, 2023): > Ah, yes. Thanks for the video recording, I reproduced the issue. This is a bug from the Gitea side and I'll send a PR to fix it. Thank you. Do you know when the fix will be available in the next Gitea package in Debian repository?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#10970