You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have read the latest README and followed the instructions.
I have read the latest GitHub Actions official documentation and learned the basic spec and concepts.
Describe your question
I'm trying to push the docs directory to the gh-pages branch. Since the gh-pages branch is protected with 1 reviewer, I cannot push anything to the gh-pages branch also I want to use a token created in Enterprise GitHub
and I don't want to use github_token instead I would like to use my token which was created by the enterprise owner on enterprise GitHub
Relevant links
Public repository: Its internal enterprise repository
YAML config:
YAML workflow:
Relevant log output
Run enterprise/gha-allure-gh-pages@v3
with:
github_token: ***
publish_branch: gh-pages
publish_dir: docs
cname: github.enterprise.com
allow_empty_commit: false
keep_files: false
force_orphan: false
enable_jekyll: false
disable_nojekyll: false
exclude_assets: .github
[INFO] Usage https://github.com/peaceiris/actions-gh-pages#readme
Dump inputs
[INFO] GithubToken: true
[INFO] PublishBranch: gh-pages
[INFO] PublishDir: docs
[INFO] DestinationDir:
[INFO] ExternalRepository:
[INFO] AllowEmptyCommit: false
[INFO] KeepFiles: false
[INFO] ForceOrphan: false
[INFO] UserName:
[INFO] UserEmail:
[INFO] CommitMessage:
[INFO] FullCommitMessage:
[INFO] TagName:
[INFO] TagMessage:
[INFO] EnableJekyll (DisableNoJekyll): false
[INFO] CNAME: github.enterprise.com
[INFO] ExcludeAssets .github
Setup auth token
[INFO] setup GITHUB_TOKEN
Prepare publishing assets
Setup Git config
/usr/bin/git remote rm origin
/usr/bin/git remote add origin ***github.enterprise.com/enterprise/abcd-automation.git
/usr/bin/git add --all
/usr/bin/git config user.name user2023
/usr/bin/git config user.email [email protected]
Create a commit
Push the commit or tag
/usr/bin/git push origin gh-pages
remote: error: GH006: Protected branch update failed for refs/heads/gh-pages.
remote: error: At least 1 approving review is required by reviewers with write access.
To https://github.enterprise.com/enterprise/abcd-automation.git
! [remote rejected] gh-pages -> gh-pages (protected branch hook declined)
error: failed to push some refs to 'https://github.enterprise.com/enterprise/abcd-automation.git'
Error: Action failed with "The process '/usr/bin/git' failed with exit code 1"
Additional context.
I want to use the token at organisational level and don't want to use the token created by the runner
The text was updated successfully, but these errors were encountered:
We can the Bypass list of the Rules for this case, I think. Could you try it?
If you want to stay to use the Branch protection rule, the Restrict who can push to matching branches is available instead.
@peaceiris
We are already using Restrict who can push to matching branches and added the TOKEN user, however, the action still considering the triggering actor and creating a runner token for the triggering actor only, even though we pass the Enterprise token, Hope you consider this situation and add a feature to make use of Enterprise Token without creating a Runner token
Checklist
Describe your question
I'm trying to push the docs directory to the gh-pages branch. Since the gh-pages branch is protected with 1 reviewer, I cannot push anything to the gh-pages branch also I want to use a token created in Enterprise GitHub
and I don't want to use github_token instead I would like to use my token which was created by the enterprise owner on enterprise GitHub
Relevant links
Relevant log output
Additional context.
I want to use the token at organisational level and don't want to use the token created by the runner
The text was updated successfully, but these errors were encountered: