Replicate secondary master branches #356
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: Replicate secondary master branches | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '10 0 * * *' | |
# branches: | |
# - master | |
jobs: | |
move-branch-pointer: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Git user | |
run: | | |
git config --global user.name "github-branch-replicator[bot]" | |
git config --global user.email "github-branch-replicator[bot]@users.noreply.github.com" | |
- name: Move branch pointer | |
run: | | |
# Fetch the latest changes | |
git fetch origin | |
# Force move branch 'master-databricks' to 'master' | |
git branch -f master-databricks master | |
# Push the changes to branch 'master-databricks' | |
git push -u origin master-databricks --force | |
# BigQuery | |
git branch -f master-bigquery master | |
git push -u origin master-bigquery --force | |
# Dremio | |
git branch -f master-dremio master | |
git push -u origin master-dremio --force | |
- name: Verify move | |
run: | | |
git checkout master-databricks | |
git log -1 |