-
Notifications
You must be signed in to change notification settings - Fork 236
Missing input uses: ad-m/github-push-action@master with: github_token: ${{ secrets.GH_TOKEN }} #187
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
Comments
Could you please specify the
|
thanks for reply. I am a college stduent and I use it for the first time. I can confirm that I have added secrets. |
Hi @zjt666666zjt, I need a bit more context and information. Could you please share a screenshot of the secrets section of the repository, the expected case, the scope and rights of the custom token, and the workflow file? Is the repository-scoped default token (GITHUB_TOKEN) not the best case for you? For this, it's also not necessary to define any GH token-related secrets. |
ok, my 'GITHUB_TOKEN' is from the 'Personal access tokens (classic)' in the setting. and in this repository . I have add a Dependabot secrets named 'GH_TOKEN' and put the'Personal access tokens (classic)'in to this secret name: Auto Update Bing Images CI on: jobs: this is my github action file . name is main.yml ##[debug]Evaluating condition for step: 'push changes' |
A Dependabot secret is not available inside workflows. If you want to specify the custom token (PAT), it's necessary to add them to the Action section. For me, your case is still not clear. Do you want to push to the same repository or another repository? Is a branch protection rule active? Why it's necessary to use a PAT? I recommend to try this corresponding settings out. |
So what should I do to keep the workflow running. The is very important for me. I am not clearly what should I do. I am comfused. |
@zjt666666zjt You should follow the following steps to handle it on your side:
I'll close this case now, feel free to reopen the case, if necessary. |
commit
- name: commit file
run: |
git config --local user.email 'github-actions[bot]@users.noreply.github.com'
git config --local user.name 'github-actions[bot]'
git diff --exit-code || git add . && git commit -am '[bot] update images.json' --allow-empty
# push
- name: push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GH_TOKEN }} but when I act this GitHub action
##[debug]Evaluating condition for step: 'push changes'
##[debug]Evaluating: success()
##[debug]Evaluating success:
##[debug]=> true
##[debug]Result: true
##[debug]Starting: push changes
##[debug]Loading inputs
##[debug]Evaluating: secrets.GH_TOKEN
##[debug]Evaluating Index:
##[debug]..Evaluating secrets:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'GH_TOKEN'
##[debug]=> null
##[debug]Result: null
##[debug]Evaluating: github.server_url
##[debug]Evaluating Index:
##[debug]..Evaluating github:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'server_url'
##[debug]=> 'https://github.com/'
##[debug]Result: 'https://github.com/'
##[debug]Loading env
Run ad-m/github-push-action@master
Push to branch main
Missing input "github_token: ${{ secrets.GITHUB_TOKEN }}".
Error: Invalid exit code: 1
at ChildProcess. (/home/runner/work/_actions/ad-m/github-push-action/master/start.js:30:21)
at ChildProcess.emit (node:events:514:28)
at maybeClose (node:internal/child_process:1105:16)
at ChildProcess._handle.onexit (node:internal/child_process:305:5) {
code: 1
}
##[debug]Node Action run completed with exit code 255
##[debug]Finishing: push changes##[debug]Evaluating condition for step: 'push changes'
##[debug]Evaluating: success()
##[debug]Evaluating success:
##[debug]=> true
##[debug]Result: true
##[debug]Starting: push changes
##[debug]Loading inputs
##[debug]Evaluating: secrets.GH_TOKEN
##[debug]Evaluating Index:
##[debug]..Evaluating secrets:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'GH_TOKEN'
##[debug]=> null
##[debug]Result: null
##[debug]Evaluating: github.server_url
##[debug]Evaluating Index:
##[debug]..Evaluating github:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'server_url'
##[debug]=> 'https://github.com/'
##[debug]Result: 'https://github.com/'
##[debug]Loading env
Run ad-m/github-push-action@master
Push to branch main
Missing input "github_token: ${{ secrets.GITHUB_TOKEN }}".
Error: Invalid exit code: 1
at ChildProcess. (/home/runner/work/_actions/ad-m/github-push-action/master/start.js:30:21)
at ChildProcess.emit (node:events:514:28)
at maybeClose (node:internal/child_process:1105:16)
at ChildProcess._handle.onexit (node:internal/child_process:305:5) {
code: 1
}
##[debug]Node Action run completed with exit code 255
##[debug]Finishing: push changes
I don’t know how to deal with it.
The text was updated successfully, but these errors were encountered: