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

expose build args, format file, update deps and fix diggest upload #44

Merged
merged 1 commit into from
Oct 31, 2024

Conversation

sebastianwebber
Copy link
Contributor

@sebastianwebber sebastianwebber commented Oct 30, 2024

when using the build workflow for multi-arch images multiple times, it fails because the file already exists.

Related: https://github.com/timescale/savannah-owl/pull/346

@sebastianwebber sebastianwebber force-pushed the sebastian/add-missing-arch-on-builds branch 2 times, most recently from e4ee401 to e832e69 Compare October 30, 2024 23:03
@sebastianwebber sebastianwebber force-pushed the sebastian/add-missing-arch-on-builds branch 3 times, most recently from c6d1e39 to 57c1655 Compare October 31, 2024 18:22
Copy link
Contributor

@graveland graveland left a comment

Choose a reason for hiding this comment

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

Added a couple comments, lgtm in general though.

with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ inputs.region }}

Copy link
Contributor

Choose a reason for hiding this comment

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

nit: I add the newlines for a visual separation between steps :)

- name: Upload digest
uses: actions/upload-artifact@v4
with:
name: digests-${{ env.PLATFORM_DASH_PAIR }}
name: digests-${{ inputs.docker_target }}-${{ env.IMAGE_DIGEST }}
Copy link
Contributor

Choose a reason for hiding this comment

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

The docker target isn't a required argument- what happens if it's not set? Just digests--<digest>? I think the platform is pretty important to include- I'm using depending on it as digests-{{ matrix.platform }}-* in the download steps elsewhere so it can properly attribute the arch. I'd suggest adding something instead of replacing the platform env?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

in this case it will generate a file like digest--2369058236gjgfhsdjgsjdtgyu23u852365

Copy link
Contributor Author

Choose a reason for hiding this comment

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

let me update the problem in the read me, when using the current strategy twice (parliament and owl) it fails because the file already exists.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yup, that would totally happen! The IMAGE_DIGEST should stop that for sure.

@sebastianwebber sebastianwebber force-pushed the sebastian/add-missing-arch-on-builds branch 2 times, most recently from 859f9a6 to 1738166 Compare October 31, 2024 18:45
this commit updates the yaml file, updating github action versions of
the dependencies, exposing the GOARCH, BPF_ARCH, and GOOS environment
variables in the docker build with build args, and fix the diggest
upload filename that was failing when this action was called more than
once.

Signed-off-by: Sebastian Webber <[email protected]>
@sebastianwebber sebastianwebber force-pushed the sebastian/add-missing-arch-on-builds branch from 1738166 to 13ca8ec Compare October 31, 2024 19:29
@sebastianwebber sebastianwebber changed the title expose some vars as build args expose build args, format file, update deps and fix diggest upload Oct 31, 2024
@sebastianwebber sebastianwebber merged commit 0b7382c into main Oct 31, 2024
3 checks passed
@sebastianwebber sebastianwebber deleted the sebastian/add-missing-arch-on-builds branch October 31, 2024 19:34
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