Can't start workflow with Gitea Actions

I’ve been trying to set up Gitea Actions via the steps outlined in the feature preview (Feature Preview: Gitea Actions - Blog) but I’m having trouble getting workflows to actually run. I’ve registered a runner with act_runner and when I start up the daemon it gives me an “Idle” status, but when I push code nothing happens. In the “Actions” tab for my repo I see the workflow I created listed, but it always just shows “0 Opened / 0 Closed.” I’m using the example from the blog post which has on: [push] so I’m not sure why nothing is happening when I push new code. Is this a common issue other folks have run into, or are there any debugging steps I should try to figure out what’s going on? Thank you!

2 Likes

Could you paste some logs from gitea side and runner side?

Thanks for the the response @lunny

When I run ./act_runner daemon it produces:

INFO[0000] Starting runner daemon                       
INFO[2023-02-06T15:47:54Z] successfully ping the docker daemon          
INFO[2023-02-06T15:47:54Z] polling the remote server                     arch=amd64 capacity=1 endpoint="https://mydomain.com/" os=linux
INFO[2023-02-06T15:47:54Z] poller: request stage from remote server      func=pollTask
INFO[2023-02-06T15:47:59Z] poller: request stage from remote server      func=pollTask
INFO[2023-02-06T15:48:04Z] poller: request stage from remote server      func=pollTask

It keeps repeating that last line indefinitely. I tried saving a change to a repo with a .gitea/workflows/release.yml file, but nothing seems to happen. Is there a way to provide more detailed logs for act_runner that would be helpful?

Here are the Gitea logs for that same period:

Gitea Logs
2023/02/06 15:56:23 ...dules/setting/log.go:322:newLogService() [I] Gitea Log Mode: File(File:info)
2023/02/06 15:56:23 ...dules/setting/log.go:328:newLogService() [I] According to the configuration, subsequent logs will not be printed to the console
2023/02/06 15:56:23 ...dules/setting/log.go:248:generateNamedLogger() [I] Router Log: Console(console:info)
2023/02/06 15:56:23 ...les/setting/cache.go:75:newCacheService() [I] Cache Service Enabled
2023/02/06 15:56:23 ...les/setting/cache.go:90:newCacheService() [I] Last Commit Cache Service Enabled
2023/02/06 15:56:23 ...s/setting/session.go:72:newSessionService() [I] Session Service Enabled
2023/02/06 15:56:23 ...ules/setting/cors.go:37:newCORSService() [I] CORS Service Enabled
2023/02/06 15:56:23 ...s/storage/storage.go:175:initAttachments() [I] Initialising Attachment storage with type: 
2023/02/06 15:56:23 ...les/storage/local.go:45:NewLocalStorage() [I] Creating new Local Storage at /var/lib/gitea/data/attachments
2023/02/06 15:56:23 ...s/storage/storage.go:165:initAvatars() [I] Initialising Avatar storage with type: 
2023/02/06 15:56:23 ...les/storage/local.go:45:NewLocalStorage() [I] Creating new Local Storage at /var/lib/gitea/data/avatars
2023/02/06 15:56:23 ...s/storage/storage.go:191:initRepoAvatars() [I] Initialising Repository Avatar storage with type: 
2023/02/06 15:56:23 ...les/storage/local.go:45:NewLocalStorage() [I] Creating new Local Storage at /var/lib/gitea/data/repo-avatars
2023/02/06 15:56:23 ...s/storage/storage.go:185:initLFS() [I] Initialising LFS storage with type: 
2023/02/06 15:56:23 ...les/storage/local.go:45:NewLocalStorage() [I] Creating new Local Storage at /var/lib/gitea/data/lfs
2023/02/06 15:56:23 ...s/storage/storage.go:197:initRepoArchives() [I] Initialising Repository Archive storage with type: 
2023/02/06 15:56:23 ...les/storage/local.go:45:NewLocalStorage() [I] Creating new Local Storage at /var/lib/gitea/data/repo-archive
2023/02/06 15:56:23 ...s/storage/storage.go:207:initPackages() [I] Initialising Packages storage with type: 
2023/02/06 15:56:23 ...les/storage/local.go:45:NewLocalStorage() [I] Creating new Local Storage at /var/lib/gitea/data/packages
2023/02/06 15:56:23 ...s/storage/storage.go:217:initActions() [I] Initialising Actions storage with type: 
2023/02/06 15:56:23 ...les/storage/local.go:45:NewLocalStorage() [I] Creating new Local Storage at /var/lib/gitea/data/actions_log
2023/02/06 15:56:24 routers/init.go:143:GlobalInitInstalled() [I] SQLite3 support is enabled
2023/02/06 15:56:24 routers/common/db.go:21:InitDBEngine() [I] Beginning ORM engine initialization.
2023/02/06 15:56:24 routers/common/db.go:28:InitDBEngine() [I] ORM engine initialization attempt #1/10...
2023/02/06 15:56:24 cmd/web.go:162:runWeb() [I] PING DATABASE sqlite3
2023/02/06 15:56:24 routers/init.go:148:GlobalInitInstalled() [W] Table system_setting Column version db default is , struct default is 1
2023/02/06 15:56:24 routers/init.go:149:GlobalInitInstalled() [I] ORM engine initialization successful!
2023/02/06 15:56:24 ...er/issues/indexer.go:173:func2() [I] [63e12328-3] PID 57500: Initializing Issue Indexer: bleve
2023/02/06 15:56:24 ...er/issues/indexer.go:269:func3() [I] [63e12328-3] Issue Indexer Initialization took 5.556723ms
2023/02/06 15:56:24 ...xer/stats/indexer.go:38:populateRepoIndexer() [I] Populating the repo stats indexer with existing repositories
2023/02/06 15:56:24 ...xer/stats/indexer.go:84:populateRepoIndexer() [I] Done (re)populating the repo stats indexer with existing repositories
2023/02/06 15:56:24 cmd/web.go:219:listen() [I] [63e12328-37] Listen: https://0.0.0.0:443
2023/02/06 15:56:24 cmd/web.go:223:listen() [I] [63e12328-37] AppURL(ROOT_URL): https://mydomain.com/
2023/02/06 15:56:24 cmd/web.go:226:listen() [I] [63e12328-37] LFS server enabled
2023/02/06 15:56:24 ...s/graceful/server.go:62:NewServer() [I] [63e12328-37] Starting new Web server: tcp:0.0.0.0:443 on PID: 57500
2023/02/06 15:56:24 cmd/web_acme.go:113:func1() [I] [63e12328-39] Running Let's Encrypt handler on 0.0.0.0:80
2023/02/06 15:56:24 ...s/graceful/server.go:62:NewServer() [I] [63e12328-39] Starting new Let's Encrypt HTTP Challenge server: tcp:0.0.0.0:80 on PID: 57500

Just let me know if I can provide more info that would be helpful for debugging. Thank you!

I figured this out, in custom/conf/app.ini I was setting LOCAL_ROOT_URL to http://localhost:80 but needed to change it to a public URL (e.g. https://mydomain.com) and then restart the service (systemctl restart gitea). I was already setting ROOT_URL to this domain, but that wasn’t enough.

1 Like

Have you enabled repository’s actions in setting UI?

Yes, actions were enabled on the repo. The problem seems to have been setting the appropriate LOCAL_ROOT_URL. It’s working for me ever since I set that.

1 Like