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

Determine tag *after* checkout #72

Merged
merged 1 commit into from
Jan 20, 2025
Merged

Determine tag *after* checkout #72

merged 1 commit into from
Jan 20, 2025

Conversation

j-mueller
Copy link
Collaborator

@j-mueller j-mueller commented Jan 19, 2025

The git diff doesn't show this properly, but

When running the OCI workflow after a "push" action (for a new tag), we call git rev-parse to figure out what the image tag should be. This only works after actions/checkout. Before the checkout action there is no github repository and git rev-parse fails.

Sadly I only noticed this after having made an official release tag for v0.1.0. So now we'll have to go straight to v0.1.1.

@j-mueller j-mueller requested a review from choener January 19, 2025 19:37
Copy link
Collaborator

@choener choener left a comment

Choose a reason for hiding this comment

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

LGTM.
But check my first comment if the ghcr login move is either intentional or benign (it should be).

@@ -29,6 +29,15 @@ jobs:
runs-on: ubuntu-latest
steps:

- name: Log in to ghcr.io
Copy link
Collaborator

Choose a reason for hiding this comment

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

Moving the login to ghcr.io is technically not necessary, I think. But should be fine according to the readme. Had me tripped up why you moved that part, too.
(But to be sure: you wanted to move the login, too?)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I moved it more or less accidentally but I agree that it shouldn't make a difference 😀

registry: ${{ env.IMAGE_REGISTRY }}

- uses: actions/checkout@v4

Copy link
Collaborator

Choose a reason for hiding this comment

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

checkout then rev-parse seems fine now.

@j-mueller j-mueller merged commit 88b2621 into main Jan 20, 2025
5 checks passed
@j-mueller j-mueller deleted the fix-container-build branch January 20, 2025 11:21
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