Reset staging to main #36
This file contains 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: Reset staging to main | |
on: | |
workflow_dispatch: # added this line to enable manual triggering | |
schedule: | |
# Run every Sunday evening at 18:00 | |
- cron: '0 18 * * 0' | |
# Run every 5 minutes for testing | |
# - cron: '*/5 * * * *' | |
jobs: | |
sync-main-to-staging: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Sync Main to Staging | |
run: | | |
git config --local user.email "[email protected]" # Use your Git email | |
git config --local user.name "joanreyero" # Use your Git username | |
git checkout staging-main | |
git merge --strategy-option=theirs main --allow-unrelated-histories -m "Sync main with staging-main joanreyero" | |
git push origin staging-main |