Sync Mainline with Staging #8
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: Sync Mainline with Staging | |
on: | |
push: | |
branches: amd-staging | |
workflow_dispatch: | |
schedule: | |
- cron: 0 5 * * sun | |
jobs: | |
promote-stg-to-main: | |
if: github.repository == 'dgaliffiAMD/rocprofiler-systems' | |
runs-on: ubuntu-latest | |
name: Promote Staging to Mainline | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
ref: amd-mainline | |
fetch-depth: '0' | |
- name: Merge - Fast Forward Only | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
gh --version | |
gh auth status | |
git checkout amd-mainline | |
git checkout -b promote-staging-$(date +%F) | |
git merge --ff-only origin/amd-staging | |
git push -u origin HEAD | |
gh pr create --base amd-mainline --title "Promote \`amd-staging\` to \`amd-mainline\`" --fill --label "automerge" |