-
Notifications
You must be signed in to change notification settings - Fork 41
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
Add GH Actions workflow for rebuilding the Docker image #715
Conversation
Codecov ReportPatch and project coverage have no change.
Additional details and impacted files@@ Coverage Diff @@
## main #715 +/- ##
=======================================
Coverage 99.67% 99.67%
=======================================
Files 89 89
Lines 6380 6380
=======================================
Hits 6359 6359
Misses 21 21 ☔ View full report in Codecov by Sentry. |
b4a43cd
to
5b1f9dd
Compare
5b1f9dd
to
bc664cf
Compare
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.
LGTM. I suppose you intend to close #713 in favour of this PR.
A couple of questions in the comments.
.github/workflows/docker-rebuild.yml
Outdated
- name: "Checkout most recent tag" | ||
run: | | ||
git fetch --tags origin | ||
git describe --abbrev=0 | xargs git checkout |
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.
Are we sure this always corresponds to the most recent release? I suppose this will always be triggered from the main branch, so it should give the last tag on the main branch. But there could be more recent tags on other branches, for example patch releases like v0.61.1
.
At some point we had tags like v0.55-dev
but those are no longer used AFAICT.
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.
Only now I noticed that it is possible to select the tag to be used as an input to the workflow_dispatch
:
I'll check how that could be used for the build step, so this a flaky way to select the tag for latest release can be removed, and the Annif version for which Docker image to be rebuilt could be freely selected.
Unfortunately the workflow_dispatch
trigger can be used only when the workflow in question is already in the default branch, so testing this while in PR is not possible.
As noted in #715 (comment), it is now made possible to select the wanted git tag when triggering the However this is possible only for the tags from the point since the rebuild workflow is added to the main branch, i.e. for the next release on. Luckily the Docker image for Annif v0.61 got rebuild when working on this PR. EDIT: but again the current development version of Annif ends up in the image. No good to merge. |
Kudos, SonarCloud Quality Gate passed! |
So stupid: ofc the current development version ends up in the image, because the tags which I created for testing this workflow were pointing to the current development version (1.0.0-dev). |
This is a simplified version of PR #713: instead of doing rebuilds automatically with a schedule, this just intends to use the "workflow dispatch" trigger to manually start the build.
The Docker images of "maintained" releases should be rebuild regularly for system package updates, but this can be done manually (and for Annif deployments it is probably a good idea to have manual control on when updates happen).
For now is probably enough to consider only the most recent release to be "maintained" in this sense, but any tag (since merging this PR) can selected for rebuild.
This PR adds a GH Actions workflow, which
<major>.<minor>
<major>.<minor>.<patch>
<major>.<minor>.<patch>-<YYYYMMDD>
(date of build)The date suffix allows pinning to a particular build of Annif's Docker image (assuming only one build per day), which is necessary also to retain a tag on an image, which would otherwise be purged from the quay.io repository, making pinning with manifest digests impossible.
The date suffix is also added to the image tags when doing the (initial) image builds for Annif releases.