I have the following github workflow:
name: TS Service Build
permissions:
packages: write
on:
workflow_dispatch:
inputs:
...
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 18.x
- name: Docker Login
run: |
export CR_PAT=${{ secrets.DOCKER_TOKEN }}
echo $CR_PAT | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Build & Push
run: |
docker build -t ghcr.io/vli20/${{ inputs.name }}:${{ inputs.image_tag }} . --build-arg path=${{ inputs.path }} --build-arg module=${{ inputs.module }}
docker push ghcr.io/vli20/${{ inputs.name }}:${{ inputs.image_tag }}
I Have created a token with the following permissions:
And assigned it to a secret with the same name. ${{ secrets.DOCKER_TOKEN }}
It seems like the login is successful:
But when I am trying to push the image to github packages, I am getting the following error:
denied: not_found: owner not found
I am using a private repo (free tier).
I only could find this webpage, but it doesn't seems to be helpful: https://issuehint.com/issue/goreleaser/goreleaser/2815
What did I miss?
denied: not_found: owner not found
There are typos in docker build
and docker push
commands i.e. repo owner's name is vli20
but your username is vlio20
. You need to fix that.
Better yet, use github.repository_owner
instead of hardcoding it.
For more details, see Publishing and installing a package with GitHub Actions.