Schedule RC #108
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: Schedule RC | |
on: | |
schedule: | |
- cron: "0 3 * * *" | |
workflow_dispatch: | |
jobs: | |
cut-release-candidate: | |
name: Cut RC | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
environment: PUSH_TO_RC_BRANCH | |
steps: | |
- name: Create GitHub App Token | |
uses: actions/create-github-app-token@v1 | |
id: app-token | |
with: | |
app-id: ${{ vars.PUSH_TO_RC_BRANCH_APP_ID }} | |
private-key: ${{ secrets.PUSH_TO_RC_BRANCH_PRIVATE_KEY }} | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
repository: ${{ github.repository }} | |
ref: ${{ github.ref }} | |
token: ${{ steps.app-token.outputs.token }} | |
- name: Cut Release Candidate | |
shell: bash | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "IDX GitHub Automation" | |
RC_BRANCH_NAME="rc--$(date '+%Y-%m-%d_%H-%M')" | |
git switch --force-create "$RC_BRANCH_NAME" HEAD | |
git push --force --set-upstream origin "$RC_BRANCH_NAME" |