.github/workflows/release-branch-sync.yaml #2652
This file contains hidden or 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
| 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 }} |