-
Notifications
You must be signed in to change notification settings - Fork 585
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
The parser will not add latest when org name contains number #1327
Comments
If I add name: docker
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
permissions:
actions: write
checks: write
pull-requests: write
contents: read
packages: write
on:
workflow_dispatch:
schedule:
- cron: '0 6 */6 * *'
push:
branches:
- "master"
paths:
- ".github/workflows/docker.yml"
- "docker/entrypoint.sh"
- "docker/Dockerfile"
jobs:
build-docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Convert tags to lowercase
run: |
ghcr_tag="ghcr.io/${{ github.repository }}"
repository="${{ github.repository }}"
repo_name="${repository#*/}"
echo "ghcr_tag=${ghcr_tag,,}" >> $GITHUB_ENV
echo "repo_name=${repo_name,,}" >> $GITHUB_ENV
- uses: docker/build-push-action@v6
with:
context: "{{defaultContext}}:docker"
file: Dockerfile
push: true
platforms: linux/amd64, linux/arm64, linux/ppc64le
tags: ${{ env.ghcr_tag }}-base
build-args: |
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
GITHUB_REPOSITORY=${{ github.repository }}
GITHUB_NAME=${{ env.repo_name }} |
I'm not sure what you mean, can you post the full logs of the workflow or link to your repo please? |
Let's say I have However, when have |
And if I add |
The parser for parse |
Looking at the few logs you gave, pushing to |
dont think you really understand, I gave enough examples and explain but you just ignore, plz check the code that has bug to parse and add |
Sorry can't help without workflow logs. |
Contributing guidelines
I've found a bug, and:
Description
The parser for
docker/build-push-action@v6
failed to add:latest
fortags: ${{ env.ghcr_tag }}
when it contains number, thus caused 404 error, see logs.I tested on my org without containing number in name, everything works fine. However, when comes to org that has number, for example
xxx3yyyy
, it will not appendlatest
, thus returnERROR: failed to solve: failed to push ghcr.io/alpha3olf/sample: unexpected status from HEAD request to
Expected behaviour
This is one with tag
tags: ${{ env.ghcr_tag }}-base
, it can work,Actual behaviour
However,
tags: ${{ env.ghcr_tag }}
, without-base
, it returns 404 forbidden due to the parser not add:latest
, seeRepository URL
No response
Workflow run URL
No response
YAML workflow
Workflow logs
No response
BuildKit logs
Additional info
No response
The text was updated successfully, but these errors were encountered: