Scheduled sync to release branch #63
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: 'Scheduled sync to release branch' | |
on: | |
# Allow manual syncing/testing. | |
workflow_dispatch: | |
# Every Monday at 0600 UTC. | |
schedule: | |
- cron: '0 6 * * 1' | |
jobs: | |
dispatch: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out release branch | |
uses: actions/checkout@v3 | |
with: | |
# uses the `khan-actions-bot` Khan Org level user which was granted | |
# permissions to override branch protections. | |
token: ${{ secrets.KHAN_ACTIONS_BOT_TOKEN }} | |
ref: release | |
- name: Merge develop into release | |
run: | | |
git config --global user.name 'khan-actions-bot' | |
git config --global user.email '[email protected]' | |
git fetch --all --unshallow | |
git merge origin/develop --no-edit -m 'Merge develop into release branch in run id ${{github.run_id}}' | |
git push | |
- name: Notify Slack on failure | |
if: failure() | |
uses: ./.github/actions/notify_slack | |
with: | |
webhook_url: ${{ secrets.SLACK_WEBHOOK_URL }} |