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

ci: merge electron bumps to staging and main [WPB-15058] #8533

Merged
merged 3 commits into from
Jan 31, 2025
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/workflows/cherry-pick-electron-bumps.yml
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, 'tbump electron from')
V-Gira marked this conversation as resolved.
Show resolved Hide resolved
uses: gorillio/github-action-cherry-pick@master
with:
pr_branch: 'main'
env:
GITHUB_TOKEN: ${{secrets.OTTO_THE_BOT_GH_TOKEN}}
30 changes: 0 additions & 30 deletions .github/workflows/dependabot-auto-merge.yml

This file was deleted.

24 changes: 24 additions & 0 deletions .github/workflows/pr-auto-merge.yml
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}}
Loading