Skip to content

clang image: rework workflow to dry run on PR #777

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

Merged
merged 1 commit into from
Mar 9, 2023

Conversation

mtardy
Copy link
Member

@mtardy mtardy commented Mar 8, 2023

Fixes #750 since other workflows build-image-ci.yml and build-images-releases.yml are already acting differently in the case of push on main and PRs.

  • Add a path addition to allow for the workflow to be tested when we modify it in a PR.
  • Add a boolean condition in quay login step and at pushing step to only push on commit on main.
  • Remove the environment since the workflow can run without approval now. We will still need the credential from the environment to login to quay thought.

Warning: I need external action on the repo for this PR to work when merged:

          username: ${{ secrets.QUAY_CLANG_RELEASE_USERNAME }}
          password: ${{ secrets.QUAY_CLANG_RELEASE_PASSWORD }}

These secrets must be moved from the environment: release-clang to the global env if it makes sense.

@mtardy mtardy added the area/ci Related to CI label Mar 8, 2023
@mtardy mtardy requested a review from willfindlay as a code owner March 8, 2023 14:13
@mtardy mtardy requested a review from joestringer March 8, 2023 14:14
@mtardy mtardy force-pushed the pr/mtardy/image-build-workflows branch 2 times, most recently from 1ff0577 to 0579008 Compare March 8, 2023 14:29
@mtardy
Copy link
Member Author

mtardy commented Mar 8, 2023

I have an issue because I cannot locally load the multi-arch build. And bom need the image to exist to generate the sbom. So I can maybe disable the whole sbom thing for dry-run?

@mtardy mtardy force-pushed the pr/mtardy/image-build-workflows branch from 0579008 to 7ebd9f2 Compare March 8, 2023 18:52
@mtardy
Copy link
Member Author

mtardy commented Mar 8, 2023

I have an issue because I cannot locally load the multi-arch build. And bom need the image to exist to generate the sbom. So I can maybe disable the whole sbom thing for dry-run?

This is basically because of this long standing issue docker/buildx#59.

@mtardy mtardy force-pushed the pr/mtardy/image-build-workflows branch from 7ebd9f2 to 890e010 Compare March 9, 2023 15:16
@mtardy mtardy temporarily deployed to release-clang March 9, 2023 15:16 — with GitHub Actions Inactive
- Add a path addition to allow for the workflow to be tested when we
  modify it in a PR.
- Add a boolean condition in quay login step and at pushing step to only
  push on commit on main.
- Reorganize the jobs into building-pushing, signing and generating sbom
  and uploading the artifacts.

Signed-off-by: Mahe Tardy <[email protected]>
@mtardy mtardy force-pushed the pr/mtardy/image-build-workflows branch from 890e010 to 159e55c Compare March 9, 2023 15:17
Copy link
Contributor

@willfindlay willfindlay left a comment

Choose a reason for hiding this comment

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

We ended up deciding to keep the release-clang environment but still do a dry-run only on PRs. This has the unfortunate side effect of requiring approval on dry-runs but I think we can live with that.

@mtardy mtardy merged commit d55c222 into main Mar 9, 2023
@mtardy mtardy deleted the pr/mtardy/image-build-workflows branch March 9, 2023 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ci Related to CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve build image workflows to dry-run on PR
2 participants