Skip to content

Update Production from Staging #9

Update Production from Staging

Update Production from Staging #9

name: Update Production from Staging
on:
workflow_dispatch:
schedule:
- cron: 0 9 * * 1
jobs:
update-production:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: |
if ! gh pr create -R ${GITHUB_REPO} --base production --head main --fill-first 2>&1 | tee logs.txt; then
if ! grep -q "could not find any commits between" logs.txt; then
exit 1
fi
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPO: ${{ github.repository }}