Skip to content

.github/workflows/release-branch-sync.yaml #2613

.github/workflows/release-branch-sync.yaml

.github/workflows/release-branch-sync.yaml #2613

name: Release Branch sync
on:
workflow_dispatch:
inputs:
source_branch:
type: string
required: false
default: '18.0-fr3'
target_branch:
type: string
required: false
default: olive
push:
branches:
- '18.0'
schedule:
- cron: '0 * * * *'
jobs:
force-push:
env:
source_branch: ${{ github.event.inputs.source_branch || '18.0' }}
target_branch: ${{ github.event.inputs.target_branch || 'olive' }}
runs-on: ubuntu-latest
if: github.repository_owner == 'openstack-k8s-operators'
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Git config
run: |
git config user.name "openstack-k8s-operators-ci"
git config user.email "openstack-k8s-operators-ci@github.com"
- name: Force Push Branch
run: |
git fetch origin ${{ env.source_branch }}
git checkout ${{ env.source_branch }}
git push --force origin ${{ env.source_branch }}:${{ env.target_branch }}