-
-
Notifications
You must be signed in to change notification settings - Fork 79
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
Cannot login to ghcr.io #261
Comments
Oh, I tried to login with the token myself, and that seems to work:
|
It appears as though I've misunderstood how this was supposed to work together. This works: - name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GH_PAT }}
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
@daenney Yes that's it! |
Does the auto-login feature in GoReleaser (goreleaser/goreleaser#1703) change any of this? Or is it still required to run the |
As of today, it looks like these things are true:
Here is a complete working example name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
packages: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- run: git fetch --force --tags
- uses: actions/setup-go@v2
with:
go-version: 1.18
- uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: goreleaser/goreleaser-action@v2
with:
distribution: goreleaser
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
Follow example: goreleaser/goreleaser-action#261 (comment)
Should work accourding to goreleaser/goreleaser-action#261 (comment)
Should work according to goreleaser/goreleaser-action#261 (comment)
Should work according to goreleaser/goreleaser-action#261 (comment)
I'm trying to have my goreleaser upload images to ghcr.io. To do that I have:
image_template
withghcr.io/daenney/{{.ProjectName}}
GH_PAT
with a PAT that has the ability to work with packages, and set that as theGITHUB_TOKEN
Unfortunately, it fails to push with:
I feel like I'm probably missing something incredibly obvious but I'm not sure what.
The text was updated successfully, but these errors were encountered: