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.

The suggested default branch example does not work for schedule

See original GitHub issue
tags: |
  type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }}

Here is an example:

https://github.com/felipecrs/jenkins-agent-dind/blob/master/.github/workflows/ci.yml#L35

https://github.com/felipecrs/jenkins-agent-dind/runs/5964649319?check_suite_focus=true#step:3:31

I would say that this variable does not get filled properly for schedule events, which is meaningful, as metadata-action relies on it.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:18 (18 by maintainers)

github_iconTop GitHub Comments

1reaction
crazy-maxcommented, Apr 26, 2022

Yes let’s keep it that way in the meantime. Will see if there is some traction from other users for this pattern.

1reaction
crazy-maxcommented, Apr 11, 2022

I would even add the is_default_branch to the list of outputs of the action, so that it can be also consumed in other parts of the workflow. As an useful helper.

This action is not a general purpose one for other steps and only exposes what it does. It should be done upstream by GitHub.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Mercurial: keep default branch "active" - Stack Overflow
So I suggest you change your deployment system to show open branches ( hg branches ) instead of active branches ( hg branches...
Read more >
How to trigger repository_dispatch event for non-default branch?
My problem with the repository dispatch is that it needs a token with repo permission. Isn't it possible to severely limit the scope...
Read more >
Ignore default branch protection for first push - GitLab.org
Problem to solve. When Default branch protection is set to Fully protected developers cannot push new commits to the default branch.
Read more >
Pipeline default branch - Azure DevOps - Microsoft Learn
A pipeline's default branch defines the pipeline version used for manual builds, scheduled builds, retention policies, and in pipeline ...
Read more >
Set the Default Branch on your Azure DevOps Repos
Changing a default Git branch might not be as simple as mentioned in the upper chapter, some additional steps might be needed in...
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