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

Bug - scheduled test #254

Closed
Uj947nXmRqV2nRaWshKtHzTvckUUpD opened this issue Dec 24, 2024 · 5 comments
Closed

Bug - scheduled test #254

Uj947nXmRqV2nRaWshKtHzTvckUUpD opened this issue Dec 24, 2024 · 5 comments

Comments

@Uj947nXmRqV2nRaWshKtHzTvckUUpD

during scheduled test, throws error during push.

Push changes to repo 0s
Run ad-m/github-push-action@master
with:
branch: refs/heads/main
github_url: https://github.com
push_to_submodules: on-demand
directory: .
/home/runner/work/_actions/ad-m/github-push-action/master/start.sh: line 18: Missing input 'github_token: ${{ secrets.GITHUB_TOKEN }}'.: bad substitution
Push to branch refs/heads/main
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:519:28)
at maybeClose (node:internal/child_process:1105:16)
at ChildProcess._handle.onexit (node:internal/child_process:305:5) {
code: 1
}

May I ask what exactly pushes and where? Why is this step needed. Using the github token on a scheduled background activity without me knowing, looked very fishy. I am sure it's not, but can we have a detailed explanation of what's going on here? thank you

@Uj947nXmRqV2nRaWshKtHzTvckUUpD
Copy link
Author

the fix probably should be in ESET-KeyGen/.github/workflows/test.yml
github_token: ${{ secrets.PAT }} -> github_token: ${{ secrets.GITHUB_TOKEN }}

@Uj947nXmRqV2nRaWshKtHzTvckUUpD
Copy link
Author

i figured it out, that the secret token is used to push timestamp change in the readme file in my forked repo.
i changed test.yml to use ${{ secrets.GITHUB_TOKEN }} instead of personal access token and it didn't fail

@Uj947nXmRqV2nRaWshKtHzTvckUUpD
Copy link
Author

Uj947nXmRqV2nRaWshKtHzTvckUUpD commented Dec 24, 2024

maybe the test should run on a separate branch not on main, so that when forked the test does not run automatically, or else too many tests will run. by default when forking, "Copy the master branch only" is checked.

i didn't test this suggestion, i don't know if this is possible, it's just a wild guess

@rzc0d3r
Copy link
Owner

rzc0d3r commented Dec 28, 2024

You can remove test.yml from the repository after a fork.
The token is used to access an entry in the repository

@Uj947nXmRqV2nRaWshKtHzTvckUUpD
Copy link
Author

yes, i actually modified the cron job time so that it doesn't run anymore, while still avoiding conflicts during repo sync if the test is updated. previously my mailbox was spammed daily with test failures from the fork. the permanent fix would be to have the test file and run it on a separate testing branch, rather than on master.

@rzc0d3r rzc0d3r closed this as completed Dec 29, 2024
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

No branches or pull requests

2 participants