Run CI on PRs and releases on the tag push #256
+7
−4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Updates the triggers for Github workflows:
Run CI on Pull Requests (opened, reopened, synchronized)
This still requires owners to approve running actions for third-party PRs.
Run release workflows on the tag push, not release action.
While the docs state that the
$github.ref_nameshould match the tag associated with the release, I noticed on the firelens project a couple of instances where that was not true. This broke the docker metadata tagging, meaning we didn't update thelatestimage tag. There appear to be other reports of this too and they suggest switching to a different$githubvariable for the tag name. However, I'm not sure if that fixes the Docker metadata action.We reference the release entity in the release workflow, so there could still be an issue if a tag was created, but not a release. However, I think that would be rare and it looks like it would hard fail the action instead of silently not pushing the tagged Docker image. Possibly future work to dig into this and switch to the github release variable, but pushing that for future work.