question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Workflow doesn't get triggered on repository creation

See original GitHub issue

Describe 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

  1. Create a template repository
  2. 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!"
  1. Create a new repository based on this template
  2. 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:closed
  • Created 3 years ago
  • Reactions:8
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
colinsrcommented, Feb 18, 2021

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. 😕

1reaction
gagoarcommented, Feb 9, 2021

We are seeing the same issue in our organization

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found