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

Limit docker build workflow runs #1167

Merged
merged 4 commits into from
Oct 29, 2024
Merged

Limit docker build workflow runs #1167

merged 4 commits into from
Oct 29, 2024

Conversation

DanRStevens
Copy link
Collaborator

Support work for:

We don't want to re-run Docker builds after merging to main, since they might end up differing slightly from builds tested and verified on branches.

Additionally, we don't want to waste time running builds for platforms that have no changes.

We don't need to parse escape codes, so single quotes should be fine.
The expected workflow is to make changes on a feature branch, where code will be tested and verified. Only once a new build image is created, and verified to run correctly, should the changes be merged into the `main` branch.

We don't want to trigger another build of the Docker image once the verified changes have been merged into the `main` branch. This would be counterproductive, as it forces a rebuild of something that should already exist, and may even introduce subtle changes in cases where installed packages have been updated between builds. That could result in using a different image than was tested and verified to work.
We only run the workflow when there are changes to the docker folder (or the workflow itself), and we only want to run jobs for platforms that have an updated Docker image to build. Of course we can't detect that change at the job level, so instead we disable the steps to build and push the Docker image when there are no changes for the current platform.
@DanRStevens DanRStevens merged commit 2429920 into main Oct 29, 2024
9 checks passed
@DanRStevens DanRStevens deleted the limitDockerBuildRuns branch October 29, 2024 20:53
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.

1 participant