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

Fix Github Actions for build-docker with external contributors #1851

Open
dadoonet opened this issue Mar 29, 2024 · 1 comment
Open

Fix Github Actions for build-docker with external contributors #1851

dadoonet opened this issue Mar 29, 2024 · 1 comment
Assignees
Labels
github_actions Pull requests that update GitHub Actions code

Comments

@dadoonet
Copy link
Owner

Describe the bug

When the build is ran for an external contribution, GA does not have access to our credentials and running docker login obviously can't work:

Run docker/login-action@v3
  with:
    ecr: auto
    logout: true
  env:
    JAVA_HOME: /opt/hostedtoolcache/Java_Adopt_jdk/17.0.10-7/x6[4](https://github.com/dadoonet/fscrawler/actions/runs/8466140957/job/23195719627?pr=1846#step:5:4)
    JAVA_HOME_17_X[6](https://github.com/dadoonet/fscrawler/actions/runs/8466140957/job/23195719627?pr=1846#step:5:6)4: /opt/hostedtoolcache/Java_Adopt_jdk/17.0.10-7/x64
    DOCKER_USERNAME: 
    DOCKER_TOKEN: 
Error: Username and password required

Expected behavior

Skip docker login with external contribution or find a way to pass our credentials to the build

Attachment

See https://github.com/dadoonet/fscrawler/actions/runs/8466140957/job/23195719627?pr=1846 as an example

@dadoonet dadoonet added the github_actions Pull requests that update GitHub Actions code label Mar 29, 2024
@dadoonet dadoonet self-assigned this Mar 29, 2024
@12eddi
Copy link

12eddi commented Apr 19, 2024

This error indicates that docker login action requires an username and a password, but it seems that these credentials are not provided in you environment variables. make sure that docker hub username and token ready, set the docker_username envoirmental variable to you Docker hub token, be sure that those environment variables are correctly passed to the docker login action. hope this helps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
github_actions Pull requests that update GitHub Actions code
Projects
None yet
Development

No branches or pull requests

2 participants