Skip to content

Merge to stage

Merge to stage #1207

name: Merge to stage
on:
schedule:
- cron: '0 */4 * * *' # Run every 4 hours
workflow_dispatch: # Allow manual trigger
repository_dispatch:
types: [merge-to-stage]
env:
MILO_RELEASE_SLACK_WH: ${{ secrets.MILO_RELEASE_SLACK_WH }}
REQUIRED_APPROVALS: ${{ secrets.REQUIRED_APPROVALS }}
SLACK_HIGH_IMPACT_PR_WEBHOOK: ${{ secrets.SLACK_HIGH_IMPACT_PR_WEBHOOK }}
MILO_STAGE_SLACK_WH: ${{secrets.MILO_STAGE_SLACK_WH}}
MAX_PRS_PER_BATCH: ${{secrets.MAX_PRS_PER_BATCH}}
STAGE_RCP_OFFSET_DAYS: ${{secrets.STAGE_RCP_OFFSET_DAYS}}
jobs:
merge-to-stage:
if: github.repository_owner == 'adobecom'
runs-on: ubuntu-latest
environment: milo_pr_merge
steps:
- uses: actions/create-github-app-token@v1
id: milo-pr-merge-token
with:
app-id: ${{ secrets.MILO_PR_MERGE_APP_ID }}
private-key: ${{ secrets.MILO_PR_MERGE_PRIVATE_KEY }}
- name: Checkout repository
uses: actions/checkout@v4
- name: Merge to stage or queue to merge
uses: actions/github-script@v7
with:
github-token: ${{ steps.milo-pr-merge-token.outputs.token }}
script: |
const main = require('./.github/workflows/merge-to-stage.js')
main({ github, context })