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

GHES: parameter token or opts.auth is required #194

Closed
zetaab opened this issue Jan 28, 2023 · 6 comments · Fixed by #196
Closed

GHES: parameter token or opts.auth is required #194

zetaab opened this issue Jan 28, 2023 · 6 comments · Fixed by #196

Comments

@zetaab
Copy link

zetaab commented Jan 28, 2023

Behaviour

Steps to reproduce this issue

  1. use this action in GHES

Expected behaviour

I expect that it should work like before

Actual behaviour

image

Configuration

  • Repository URL (if public):
  • Build URL (if public):
jobs:
  build:
    runs-on:
    - self-hosted
    timeout-minutes: 15
    steps:
    - uses: actions/checkout@v3
      with:
        fetch-depth: 0

    - uses: actions/setup-go@v3
      with:
        go-version: 1.19

    - name: Set up Docker Buildx
      uses: docker/setup-buildx-action@v2

Logs

Download the log file of your build
and attach it to this issue.

@zetaab
Copy link
Author

zetaab commented Jan 28, 2023

@crazy-max & co. I see that you are doing lots of commits currently to GHES items as well. However, like newest instructions says that use tag v3. However, no such tag exists in this repository? At least I did not like the way the backwards compatibility is handled here. All of our nightly builds failed and all pipelines are currently broken which uses this action.

If I understand this correctly, everything were working without token until #191 & #192 and now everyone should start making PATs in github.com if using GHES? Well...

@zetaab zetaab changed the title setup-buildx-action broken in GHES: parameter token or opts.auth is required GHES: parameter token or opts.auth is required Jan 28, 2023
@crazy-max
Copy link
Member

@zetaab

like newest instructions says that use tag v3.

It should be docker/setup-buildx-action@v2 in the instructions, will fix this.

If I understand this correctly, everything were working without token until #191 & #192 and now everyone should start making PATs in github.com if using GHES? Well...

We got an issue yesterday #190 with a GitHub API endpoint we were using to check releases on buildx repository. We have to switch to the official Octokit client.

Looking at your workflow it should use the current Buildx version available on your runner. I will take a look.

@zetaab
Copy link
Author

zetaab commented Jan 28, 2023

why we should have buildx located in runner beforehand? It does not support downloading buildx anymore? We are hosting our github action runners in kubernetes. The runners will download the packages that they need, and now it looks like it does not work anymore.
Screenshot 2023-01-28 at 15 11 27

@crazy-max
Copy link
Member

why we should have buildx located in runner beforehand? It does not support downloading buildx anymore?

https://github.com/docker/setup-buildx-action#using-on-ghes

On public runners Buildx is pre-installed: https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2204-Readme.md

If not found then we need to check latest stable on Buildx repo which uses the GitHub API. Previously we could make unauth call to a specific endpoint https://github.com/docker/buildx/releases/latest but it broke yesterday without notice 😣

I will check if we can just host ourselves the latest version on buildx repo so we don't need any API calls.

In the meantime you can have this step before the docker/setup-buildx-action step:

  - name: Download buildx
    run: |
      mkdir -p ~/.docker/cli-plugins
      wget https://github.com/docker/buildx/releases/download/v0.10.1/buildx-v0.10.1.linux-amd64 -O ~/.docker/cli-plugins/docker-buildx
      chmod +x ~/.docker/cli-plugins/docker-buildx

@zetaab
Copy link
Author

zetaab commented Jan 28, 2023

yeah it seems to work if we cache buildx to the runner image

@crazy-max
Copy link
Member

@zetaab #196 should help for your case. You can try with crazy-max/docker-setup-buildx-action@dl-no-token.

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 a pull request may close this issue.

2 participants