Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

denied by branch protections #12

Closed
TomVasile opened this issue Feb 23, 2023 · 1 comment
Closed

denied by branch protections #12

TomVasile opened this issue Feb 23, 2023 · 1 comment

Comments

@TomVasile
Copy link

Wondering what is the best way to work around branch protections?

Error: {"command":"git push origin HEAD","exitCode":1,"outputData":"","errorData":"remote: error: GH006: Protected branch update failed for refs/heads/dev.        \nremote: error: At least 1 approving review is required by reviewers with write access. 2 of 2 required status checks are expected.
@gautamkrishnar
Copy link
Owner

gautamkrishnar commented Feb 23, 2023

@TomVasile simply add a contents: write to the yaml file:

name: Github Action with a cronjob trigger
on:
  schedule:
    - cron: "0 0 * * *"
permissions:
  contents: write

jobs:
  cronjob-based-github-action:
    name: Cronjob based github action
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      # - step1
      # - step 2
      # - step n, use it as the last step
      - uses: gautamkrishnar/keepalive-workflow@v1 # using the workflow with default settings

You can also follow: gautamkrishnar/blog-post-workflow#67 (comment)

Repository owner locked and limited conversation to collaborators Feb 23, 2023
@gautamkrishnar gautamkrishnar converted this issue into discussion #13 Feb 23, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants