-
Notifications
You must be signed in to change notification settings - Fork 1
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 input for which version to deploy on Deploy App
workflow
#137
Conversation
Pass the value along to the other workflows as necessary.
Markdown lint failure unrelated to these changes, created navapbc/template-infra#750 |
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.
Looks good, just one important change to pass in IMAGE_TAG rather than checking out a different ref
@@ -11,6 +11,10 @@ on: | |||
description: "the name of the application environment (e.g. dev, staging, prod)" | |||
required: true | |||
type: string | |||
version: | |||
description: "git reference to deploy (e.g., a branch, tag, or commit SHA)" |
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.
description: "git reference to deploy (e.g., a branch, tag, or commit SHA)" | |
description: "git reference to deploy (e.g. branch, tag, or commit SHA)" |
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, feel free to create the template-infra PR now.
If you are inclined to you can test a situation where the branch we're running the workflow from is different from the version we're deploying. E.g. you can make a change to the test app in this branch (e.g. change the hello world string), then undo the change, then run a deploy from main
branch but pass in the commit SHA of the commit that had the change and deploy to dev
.
But I don't feel strongly about that level of test, this feels like a reasonably low risk change to me.
Going over it again, I don't think we want to just pass in |
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.
Good point on needing to get the commit hash not just the version. Maybe test it using this branch to make sure it works?
@@ -63,7 +67,7 @@ jobs: | |||
- name: Check if image is already published | |||
id: check-image-published | |||
run: | | |||
is_image_published=$(./bin/is-image-published "${{ inputs.app_name }}" "${{ inputs.ref }}") | |||
is_image_published=$(./bin/is-image-published "${{ inputs.app_name }}" "${{ needs.get-commit-hash.outputs.commit_hash }}") |
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 finding and fixing this bug! I could have sworn I fixed this issue but I was still seeing it happen but didn't have time to look into it
Merged in navapbc/template-infra@4275fd0 |
Ticket
Resolves navapbc/template-infra#693
Changes
Pass the value along to the other workflows as necessary.
Testing
Deploying with defaults (
dev
env andmain
version): https://github.com/navapbc/platform-test/actions/runs/10926380147Deploying this branch (which is functionally same asoutdatedmain
at time of testing) todev
to see the different version get carried through and succeed: https://github.com/navapbc/platform-test/actions/runs/10926808599Deploying this branch (which is functionally same asoutdatedmain
at time of testing) todev
to see the different version get carried through and succeedhttps://github.com/navapbc/platform-test/actions/runs/11000627559
Deploying this branch (which is functionally same as
main
at time of testing) todev
to see the different version get carried through and succeed: https://github.com/navapbc/platform-test/actions/runs/11040058211Preview environment
♻️ Environment destroyed ♻️