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

Version 1.45.0 Has The new_tag Output Return As Empty #182

Closed
Zozman opened this issue Sep 13, 2022 · 1 comment
Closed

Version 1.45.0 Has The new_tag Output Return As Empty #182

Zozman opened this issue Sep 13, 2022 · 1 comment

Comments

@Zozman
Copy link

Zozman commented Sep 13, 2022

Issue

On action version 1.45.0, the new_tag output is returned as an empty string.

Example

Action Code

     - name: Bump version and push tag
        uses: anothrNick/github-tag-action@1.44.0
        id: tag
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          DEFAULT_BUMP: patch

      - name: Login to GitHub Container Registry
        uses: docker/login-action@v2
        with:
          registry: ghcr.io
          username: ${{ github.actor }}
          password: ${{ secrets.GITHUB_TOKEN }}

      - name: Build & push Docker image to GitHub Container Registry
        uses: docker/build-push-action@v3
        with:
          push: true
          platforms: linux/amd64,linux/arm64
          tags: |
            ghcr.io/user/repo:latest
            ghcr.io/user/repo:${{ steps.tag.outputs.new_tag }}

Result

/usr/bin/docker buildx build --iidfile /tmp/docker-build-push-zz6BYw/iidfile --platform linux/amd64,linux/arm64 --secret id=GIT_AUTH_TOKEN,src=/tmp/ --tag ghcr.io/user/repo:latest --tag ghcr.io/user/repo: --metadata-file /tmp/docker-build-push/metadata-file --push https://github.com/user/repogit#fakehash
ERROR: invalid tag "ghcr.io/user/repo:": invalid reference format
Error: buildx failed with: ERROR: invalid tag "ghcr.io/user/tag:": invalid reference format

As shown in this example, ${{ steps.tag.outputs.new_tag }} ends up being an empty string so the tag ghcr.io/user/repo: ends up invalid as it's a docker tag with no actual tag on it.

Workaround

Downgrading to 1.44.0 fixes the issue.

@Zozman Zozman changed the title Version 1.0.45 Has The new_tag Output Return As Empty Version 1.45.0 Has The new_tag Output Return As Empty Sep 13, 2022
This was referenced Sep 14, 2022
@sammcj
Copy link
Collaborator

sammcj commented Sep 14, 2022

yikes! OK another test case needs to be added for this!

Going to revert in #183

@sammcj sammcj closed this as completed Sep 15, 2022
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

No branches or pull requests

2 participants