-
Notifications
You must be signed in to change notification settings - Fork 237
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: merge electron bumps to staging and main [WPB-15058] (#8533)
* ci: merge electron bumps to staging and main [WPB-15058] (#8502) * runfix: move condition to create PR stage and base condition on commit name * Update .github/workflows/cherry-pick-electron-bumps.yml
- Loading branch information
Showing
3 changed files
with
61 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# This job will automatically create a cherry-pick PR for any update to the electron version on the dev branch. | ||
# It allows the staging and main branch to stay up-to-date with dependabot electron bumps on dev. | ||
name: Cherry-pick Electron bumps | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'dev' | ||
|
||
permissions: | ||
pull-requests: write | ||
contents: write | ||
|
||
jobs: | ||
cherry_pick: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Create PR to staging | ||
if: contains(github.event.head_commit.message, 'bump electron from') | ||
uses: gorillio/github-action-cherry-pick@master | ||
with: | ||
pr_branch: 'staging' | ||
env: | ||
GITHUB_TOKEN: ${{secrets.OTTO_THE_BOT_GH_TOKEN}} | ||
|
||
- name: Create PR to main | ||
if: contains(github.event.head_commit.message, 'bump electron from') | ||
uses: gorillio/github-action-cherry-pick@master | ||
with: | ||
pr_branch: 'main' | ||
env: | ||
GITHUB_TOKEN: ${{secrets.OTTO_THE_BOT_GH_TOKEN}} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: auto-merge PR | ||
on: pull_request | ||
|
||
permissions: | ||
pull-requests: write | ||
contents: write | ||
|
||
# This job will enable auto merge on dependabots and otto-the-bot's PRs | ||
jobs: | ||
activate-auto-merge: | ||
runs-on: ubuntu-latest | ||
if: ${{github.actor == 'dependabot[bot]' || github.actor == 'otto-the-bot'}} | ||
steps: | ||
- name: Approve PR | ||
run: gh pr review --approve "$PR_URL" | ||
env: | ||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | ||
PR_URL: ${{github.event.pull_request.html_url}} | ||
|
||
- name: Enable auto-merge | ||
run: gh pr merge --auto --squash "$PR_URL" | ||
env: | ||
GITHUB_TOKEN: ${{secrets.OTTO_THE_BOT_GH_TOKEN}} | ||
PR_URL: ${{github.event.pull_request.html_url}} |