Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use commit SHA for manual deploys when branch name starts with 'v' #1413

Open
theseanything opened this issue Aug 1, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@theseanything
Copy link
Contributor

There's a bug in the deployment system which causes manual deployments of branch names being with 'v' to use the branch name to tag the images, instead of the commit SHA for the HEAD of the branch. This prevents subsequent commits in the same branch from being deployed as the image continues to have the same tag.

This is caused by our rather blunt logic to determine if a gitRef is a tag.

type=raw,priority=500,value=${{ inputs.gitRef }},enable=${{ startsWith(inputs.gitRef, 'v') }}

We can't test github.ref to see if it starts with refs/tags/v as workflow dispatch calls (i.e. manual deploys) will always set it to main. We'd like to still support manual deploys of version tags.

We probably could just run git describe --exact-match --tags which will fail if the repository isn’t checked out to a tag.

@theseanything theseanything changed the title Use commit SHA for manual deploys when branch name starting with 'v' Use commit SHA for manual deploys when branch name starts with 'v' Aug 1, 2024
@theseanything theseanything added the bug Something isn't working label Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant