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

add DockerHub overview update workflow #249

Merged

Conversation

rajyan
Copy link
Contributor

@rajyan rajyan commented Jun 19, 2021

fixes rectorphp/rector#6457

tested
rectorphp/rector#6457 (comment)

Requires DockerHub password to run, and I believe this is the only way to update overview constantly with a path other than README.md.

@rajyan
Copy link
Contributor Author

rajyan commented Jun 19, 2021

@TomasVotruba
ready for review!

password: ${{ secrets.DOCKER_PASSWORD }}
repository: rector/rector
readme-filepath: ./docs/how_to_run_rector_in_docker.md

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 👍

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems need token? https://github.com/rectorphp/rector/runs/2865521242#step:5:1

with:
   username: ***
    password: ***
    repository: rector/rector
    readme-filepath: ./docs/how_to_run_rector_in_docker.md
  env:
    COMPOSER_ROOT_VERSION: dev-main
Acquiring token
Sending PATCH request

Error: FORBIDDEN

@TomasVotruba TomasVotruba merged commit c2dbe67 into rectorphp:main Jun 19, 2021
@rajyan rajyan deleted the dockerhub-description-update-workflow branch June 19, 2021 16:12
@rajyan
Copy link
Contributor Author

rajyan commented Jun 19, 2021

@TomasVotruba @samsonasik
https://github.com/rectorphp/rector/actions/runs/952762137
😢
This means that secrets.DOCKER_PASSWORD uses a PAT (which is recommended and I think better). Maybe no way to update it automatically.

We have to wait for DockeHub API to solve this problem…
Or changing DOCKER_PASSWORD secret to password until it’s fixed?

@samsonasik
Copy link
Member

@rajyan could you update to:

        username: ${{ secrets.DOCKERHUB_USERNAME }}
        password: ${{ secrets.DOCKERHUB_PASSWORD }}

to new PR? @TomasVotruba may need to insert to secrets to allow get the docker hub password, is it?

@rajyan
Copy link
Contributor Author

rajyan commented Jun 20, 2021

@samsonasik
Isn’t DOCKER_USERNAME===DOCKEHUB_USERNAME?
@TomasVotruba
I think It’s just a security decision whether using dockerhub password to login or not. (That is replacing DOCKER_PASSWORD from pesonal access token to "password")
If it’s not applicable, I think we have to revert this PR.

@samsonasik
Copy link
Member

@rajyan should be it is

@samsonasik
Copy link
Member

samsonasik commented Jun 20, 2021

@rajyan could you create 2 PRs alternative?:

  1. PR that Revert this
  2. PR that use different secret variable like secrets.DOCKERHUB_PASSWORD so @TomasVotruba can insert the docker hub password in the github repo settings.

thank you.

rajyan added a commit to rajyan/rector-src that referenced this pull request Jun 20, 2021
@rajyan
Copy link
Contributor Author

rajyan commented Jun 20, 2021

@samsonasik @TomasVotruba
I created the 2 PRs!
There are 3 ways to fix.

  1. Changing secret name to DOCKERHUB_PASSWORD and adding a new secret change secret name #255
  2. Just revert Revert "add DockerHub overview update workflow (#249)" #254
  3. Replacing DOCKER_PASSWORD with a password and rerunning the workflow

samsonasik pushed a commit that referenced this pull request Jun 20, 2021
This pull request was closed.
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 this pull request may close these issues.

Add info about Docker to readme
3 participants