Conversation
12bbec4 to
cf69a52
Compare
peterdudfield
left a comment
There was a problem hiding this comment.
Looks good. Last time the bump version didnt work when doing a new release. We could check this by
- pinned a repo to this branch, maybe PVConsumer
- do a release (check it works)
- merge this
- change back to
mainon PVConsumer
It worked - https://github.com/openclimatefix/PVConsumer/actions/runs/4540372174/jobs/8001227925 |
| # a commit on top of the default commit to which the action would be otherwise pointing. | ||
| ref: main | ||
| submodules: ${{ inputs.checkout_submodules }} | ||
| - name: Docker meta |
There was a problem hiding this comment.
Could you add the 'tag_value' in the name, this makes it really easy to see what docker image is being built.
This is what I often do, merge the PR to main, look at workflow new tag, and then update it on terraform cloud
There was a problem hiding this comment.
Do you mean adding back the run: echo ${{ needs.build.outputs.new_tag }} that I remove?
Or actually having something like name: Docker meta ${{ inputs.tag_value }}?
There was a problem hiding this comment.
yes please, or some easy way to see what version is being built
peterdudfield
left a comment
There was a problem hiding this comment.
Looks good Simon,
One small comment
50dbcb6 to
c874905
Compare
Instead of copy pasting a lot of code between workflows, we reuse simpler workflows. These are new: * bump-version * github-release * publish-to-pypi * push-docker Also: * Support submodules in docker-release-only workflow * Rename "new_tag" -> "new_ver" * Bump jasonamyers/github-bumpversion-action to 1.0.5 * Uniformize job names * Remove `workdir` option (it wasn't used anywhere)
c874905 to
68ee60a
Compare

Background
This is very similar to #36 which turned out to break in some places and was reverted in #37. Here I fix the issue and extract even more steps into reusable workflows.
The issue was that we were checking out the code before the version bump commit. When one job creates a new commit, we must checkout
mainexplicitly, otherwise it defaults to the last commit at the time the workflow was started.Description
Instead of copy pasting a lot of code between workflows, we reuse simpler workflows. These are new:
Also:
bump-versionneeds to be done before the other ones. This means more parallelism.workdiroption (it wasn't used anywhere)This should in theory be fully backward compatible with 1.0.0.
Tests