Skip to content
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(ci): Move updating docker tag into own job to avoid setting it twice per run: when the builder image is built and when the app image is built #269

Merged
merged 5 commits into from
Feb 28, 2025

Conversation

andreiborza
Copy link
Member

Previously, when the CI triggers for master, the action changes the docker tag back from whatever was committed in a branch to master and commits and pushes this change back to the master branch.

However, because the job is run ist run twice, once for the builder docker image and once for the app docker image, that step was executed twice, trying to commit and push twice.

We only want to do this once, so I extracted this up into its own job that the building job depends on.

@andreiborza andreiborza requested a review from chargome February 27, 2025 15:58
@andreiborza andreiborza force-pushed the ab/set-docker-tag-once branch 4 times, most recently from 465e2f0 to 5bae549 Compare February 27, 2025 17:00
…ice per

run: when the builder image is built and when the app image is built
@andreiborza andreiborza force-pushed the ab/set-docker-tag-once branch from 5bae549 to f272755 Compare February 27, 2025 17:01
@@ -84,7 +84,7 @@ runs:
INPUT_WORKING_DIRECTORY: ${{ inputs.working_directory }}
INPUT_DISABLE_TELEMETRY: ${{ inputs.disable_telemetry }}
INPUT_DISABLE_SAFE_DIRECTORY: ${{ inputs.disable_safe_directory }}
uses: docker://ghcr.io/getsentry/action-release-image:master
uses: docker://ghcr.io/getsentry/action-release-image:ab-set-docker-tag-once
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the image name is correct?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the flow is to always publish and commit an image name that is based on the git branch name. After merging, the workflow will then trigger and change it back to master.

@andreiborza andreiborza merged commit 79b15d9 into master Feb 28, 2025
19 checks passed
@andreiborza andreiborza deleted the ab/set-docker-tag-once branch February 28, 2025 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants