-
Notifications
You must be signed in to change notification settings - Fork 50
Add manually triggered action for pushing docker image by SHA #636
Conversation
This is ready for review! I ran an API job for commit: Here is the run: https://github.com/WordPress/openverse-api/runs/5891296828?check_suite_focus=true |
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!
- name: Download image `${{ github.event.inputs.image }}` | ||
uses: dawidd6/action-download-artifact@v2 | ||
with: | ||
workflow: ci_cd.yml | ||
workflow_conclusion: success | ||
pr: ${{github.event.pull_request.number}} | ||
name: ${{ github.event.inputs.image }} | ||
path: /tmp |
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.
I guess the only thing to note here is Github's artifact retention policy, which defaults to 90 days. So this action could fail if run on a SHA that hasn't been built for the last 90 days.
That seems unlikely, but just in case, something to note!
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.
That's a great point! I hope we're not trying to run this on a 90-day old SHA down the line 😅
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.
Thank you for detailed explanation in this PR! It would be nice to have it somewhere in the documentation, if it's not already (along with the comment about 90 days that Sara mentioned)
I'll add some documentation for this, then merge it 🙂 |
I added documentation and made some minor adjustments to other pages. I'd like to add screenshots but until this gets merged into |
Fixes
Fixes #597 by @AetherUnbound
Description
This PR adds the ability to tag a Docker image artifact by SHA only and push it to our container registry. The workflow is manually triggered and requires an input on which image to push (only one option is allowed because we are almost never making changes to both the API and ingestion server images).
The example use case for this: We've made a change to one of the services, and want to deploy it on staging. Our deployment process requires (or will soon require) a tagged Docker image to deploy. Running this workflow will tag and push an image by SHA only, so
latest
is unaffected. We can then deploy by pointing to said commit.Testing Instructions
I'm going to test this in this PR!
Checklist
Update index.md
).main
) or a parent feature branch.Developer Certificate of Origin
Developer Certificate of Origin