Workflow doesn't get triggered on repository creation
See original GitHub issueDescribe the bug
I have a workflow set on some of my template repositories that should get triggered on push
. I’m seeing an inconsistency in terms of behavior when creating a new repository from my templates: this workflow is sometimes not triggered on the initial commit (First commit
)
To Reproduce
- Create a template repository
- Add a new workflow that should get triggered on push (except on the template repository) such as:
name: init
on: push
jobs:
init:
runs-on: ubuntu-latest
if: github.repository != 'user/your-template-repository'
steps:
- uses: actions/checkout@v2
- name: Test
run: echo "Hello World!"
- Create a new repository based on this template
- Sometimes the workflow
init
will run inside of the new repository, but sometimes it doesn’t
Expected behavior
The push
trigger should always start the workflow on repository creation from template
Runner Version and Platform
2.272.0
OS of the machine running the runner? ubuntu-latest
Issue Analytics
- State:
- Created 3 years ago
- Reactions:8
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Github Actions doesn't get triggered on release creation
My question is how to debug events and see why first workflow is not invoked. I've tried already published and released without any...
Read more >My GitHub Actions workflows are not starting
When you are creating the first workflow in a repo, you might learn you have configured the wrong directory because the UI does...
Read more >Workflow not triggered by GitHub push - Build Environment
When I push a change in this repo (also find yml there) the workflow is not triggered anymore. It did once when we...
Read more >Troubleshoot workflow triggers
Your project is not using the workflow that has been configured with triggers. Go to your project and click Project settings. From the...
Read more >Triggers | Dev Cheatsheets
To trigger specific workflows in a repository, use the workflow_dispatch event . If you set up this option, then you'll get a button...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Bump => My workflows are hit or miss when creating a new project from a template in company’s Org as well. My current workaround when the workflow is a dud involves pushing a commit on the branch I’m targeting. Certainly leaves a “not ready for primtetime” taste in my mouth TBH. 😕
We are seeing the same issue in our organization