-
Notifications
You must be signed in to change notification settings - Fork 0
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
Build all branches, delete image versions when branches/tags are deleted #14
Conversation
Pushes to the `main` branch will update the `dev` tag. Pushes to all other branches will update `branch-<branchname>` tags.
I'll get to this in the next couple of days! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally looks good! I'm not as familiar with JavaScript so leaving any specific details in those scripts to @dan-knight or @aholmes
thought (non-blocking):
Cool - though not directly relevant to this PR, note (non-blocking):
I didn't check to see if you're doing something to get around this, but here's a suggestion. In BL_Python there are several outputs from jobs that are used in later jobs. For example, here's how I create the cache key in the initial checkout that is then referenced by all subsequent jobs. You can similarly negate the value of |
question (non-blocking):
Though we have typically avoided using it, thoughts on updating the |
Unfortunately it's not a variable
I don't think we shouldn't have both |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two blocking comments. We can discuss in more detail; I know the Dependabot one is not fully fleshed out at the moment, and the one about variable expansion only applies if it actually matters in that context.
I share your concern, and see the utility in |
Description
This is a major overhaul of this Action, intended to be released as
v2.0.0
(see plan from #12). The gist of these changes is that the Action manages the full lifecycle of images in GHCR: it will now build and deploy images for all branches of the repository, as well as all SemVer tags. When a branch or tag is deleted from GitHub, the corresponding image version is deleted from the container registry. (That is #13, but I'm not going to close that issue until therefactor-base
branch is merged back intomain
).The git SemVer tag
v1.2.3
will result in the docker version1.2.3
(note the lack ofv
).The git branch
foobar
will result in the docker versionbranch-foobar
. The one exception to this behavior is that themain
branch will map todev
- that's in line with the current behavior of this Action.Note
The default branch name is hard-coded as
main
.docker/metadata-action
has an{{is_default_branch}}
expression, but unfortunately there is currently no way to negate it.Testing
I tested this Action with a fresh repository - the assorted runs can be seen here. The example workflow in the README sets the
run-name
to a useful value:Individual workflow runs will emit annotations linking to the newly-created or deleted image versions:
Errata
registry
input (defaultghcr.io/uclahs-cds
) with anorganization
input (defaults to the organization of the calling repository, usuallyuclahs-cds
for us).run-name
for tags (e.g. "Updatev0.0.8
docker tag") incorrectly includes the leadingv
. GitHub Expressions don't have asubstring
function, and I couldn't figure out any way to abuse the existing functions to replicate it.Checklist
.png
, .jpeg
),.pdf
,.RData
,.xlsx
,.doc
,.ppt
, or other non-plain-text files. To automatically exclude such files using a .gitignore file, see here for example.main
branch protection rule following the github standards before opening this pull request.CHANGELOG.md
under the next release version or unreleased, and updated the date.