-
Notifications
You must be signed in to change notification settings - Fork 4
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
Fix/continuous delivery #834
base: staging
Are you sure you want to change the base?
Conversation
@@ -7,6 +7,11 @@ on: | |||
description: Merge staging into master first? (y/N) | |||
required: false | |||
default: 'n' |
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.
Can you make this one boolean too? I think I made it like this because boolean was not an option back in the day, but I see the UI nicely supports it now. Don't forget the checks below :)
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files
☔ View full report in Codecov by Sentry. |
@lodewiges there's a problem with your commit: you have not taken care of the places where the value of this input is used. You can't change a type without updating the usages of the variable. |
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.
see comment
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 one last request
@@ -61,7 +67,7 @@ jobs: | |||
name: Merge | |||
runs-on: ubuntu-latest | |||
needs: metadata | |||
if: github.event.inputs.merge == 'y' | |||
if: github.event.inputs.merge == 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.
if: github.event.inputs.merge == true | |
if: github.event.inputs.merge |
can't we do this?
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.
What i found online is that ==true is better. source: https://stackoverflow.com/questions/2953646/how-can-i-declare-and-use-boolean-variables-in-a-shell-script/21210966#21210966
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.
we need to decide what would be better, and implement that everywhere, i forgot it in one 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.
You are talking about shell expressions, I'm talking about GitHub expressions: https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/evaluate-expressions-in-workflows-and-actions
They are separate concepts.
I've doublechecked why I suggested this. I come to a slightly more nuanced conclusion now, based on https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#onworkflow_dispatchinputs
I think the conclusion is we can use inputs.merge
and we don't need to check against a string, but when we use github.event.inputs.merge
we do need to check against a string, because:
The workflow will also receive the inputs in the github.event.inputs context. The information in the inputs context and github.event.inputs context is identical except that the inputs context preserves Boolean values as Booleans instead of converting them to strings. The choice type resolves to a string and is a single selectable option.
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 think implemented it correctly can you check?
bump |
If the workflow fails with an error message about blobs along the lines of the following:
buildx failed with: ERROR: failed to solve: [...] blob [...]
then all recent cache files for staging on the Caches page need to be deleted and the workflow needs to be executed again. Instructions for this were added to the README.md.Also added the option
Perform all jobs, regardless of whether there are actual changes?
to force the workflow to re-execute all its jobs. This was added because if the previous workflow run errored after staging was merged into master it will detect no changes and skip the Continuous Integration and Publish Image jobs, which means the changes won't go live.