Skip to content

Fix failing CI when not tagging a docker image#3100

Merged
sgoggins merged 1 commit intoaugurlabs:mainfrom
JohnStrunk:fix-ci-docker
Apr 2, 2025
Merged

Fix failing CI when not tagging a docker image#3100
sgoggins merged 1 commit intoaugurlabs:mainfrom
JohnStrunk:fix-ci-docker

Conversation

@JohnStrunk
Copy link
Copy Markdown
Contributor

@JohnStrunk JohnStrunk commented Apr 1, 2025

Description
This is a follow-up to #3093 that attempts to fix the current failing CI due to trying to push a non-tagged docker image.

The following is taken from #3010

ERROR: tag is needed when pushing to registry

The issue is that we are trying to push the image for any non-PR triggered build, but that doesn't match the logic for when we actually tag an image. The logic here will key off of whether we have actually applied a tag with the actual intent to push. (I'm also keeping the != pull_request check just to be safe)

Notes for Reviewers

Signed commits

  • Yes, I signed my commits.

Signed-off-by: John Strunk <jstrunk@redhat.com>
@JohnStrunk JohnStrunk marked this pull request as draft April 1, 2025 19:48
@JohnStrunk JohnStrunk marked this pull request as ready for review April 1, 2025 19:57
@JohnStrunk
Copy link
Copy Markdown
Contributor Author

@sgoggins I noticed my PR from yesterday was causing some failed checks. This should fix it.

@sgoggins
Copy link
Copy Markdown
Collaborator

sgoggins commented Apr 1, 2025

@JohnStrunk : Just to confirm my understanding here: We will push new images when a new release is tagged now?

@JohnStrunk
Copy link
Copy Markdown
Contributor Author

It should. The tags are applied here, with the final line being the one for releases:

          tags: |
            type=raw,value=devel-latest,enable=${{ (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/dev' }}
            type=raw,value=latest,enable=${{ github.event_name == 'release' }}
            type=raw,value=${{ github.event.release.tag_name }},enable=${{ github.event_name == 'release' }}

The tags are then provided as a step output to the build/push step as a comma separated list. My change is gating whether we try to push (or only build) based on whether any tags are provided.

The release this morning looks like it built & pushed correctly. This change shouldn't interfere.

@sgoggins sgoggins merged commit 2da45ae into augurlabs:main Apr 2, 2025
12 checks passed
@JohnStrunk JohnStrunk deleted the fix-ci-docker branch July 9, 2025 15:59
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