2023-06-29 15:33:18 +02:00
|
|
|
---
|
|
|
|
name: Auto Update Branch
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2023-12-12 20:57:50 +01:00
|
|
|
- 'main'
|
2023-06-29 15:33:18 +02:00
|
|
|
- 'rc'
|
|
|
|
paths:
|
|
|
|
- 'apps/web/**'
|
|
|
|
- 'libs/**'
|
|
|
|
- '*'
|
|
|
|
- '!*.md'
|
|
|
|
- '!*.txt'
|
|
|
|
- '.github/workflows/build-web.yml'
|
|
|
|
workflow_dispatch:
|
|
|
|
inputs: {}
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
update:
|
|
|
|
name: Update Branch
|
|
|
|
runs-on: ubuntu-22.04
|
|
|
|
env:
|
|
|
|
_BOT_EMAIL: 106330231+bitwarden-devops-bot@users.noreply.github.com
|
|
|
|
_BOT_NAME: bitwarden-devops-bot
|
|
|
|
steps:
|
|
|
|
- name: Setup
|
|
|
|
id: setup
|
2023-06-29 17:36:53 +02:00
|
|
|
run: echo "branch=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT
|
2023-06-29 15:33:18 +02:00
|
|
|
|
|
|
|
- name: Checkout repo
|
2024-02-08 20:38:19 +01:00
|
|
|
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
|
2023-06-29 15:33:18 +02:00
|
|
|
with:
|
|
|
|
ref: 'eu-web-${{ steps.setup.outputs.branch }}'
|
2023-06-29 17:36:53 +02:00
|
|
|
fetch-depth: 0
|
2023-06-29 15:33:18 +02:00
|
|
|
|
|
|
|
- name: Merge ${{ steps.setup.outputs.branch }}
|
|
|
|
run: |
|
|
|
|
git config --local user.email "${{ env._BOT_EMAIL }}"
|
|
|
|
git config --local user.name "${{ env._BOT_NAME }}"
|
2023-06-29 17:36:53 +02:00
|
|
|
git merge origin/${{ steps.setup.outputs.branch }}
|
2023-06-29 15:33:18 +02:00
|
|
|
git push
|