Skip to content

Commit

Permalink
Auto sync staging and mainline on a weekly cadence (ROCm#517)
Browse files Browse the repository at this point in the history
Signed-off-by: coleramos425 <colramos@amd.com>
  • Loading branch information
coleramos425 authored Jan 2, 2025
1 parent ea7d663 commit 4c722b7
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/weekly-mainline-sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Sync Mainline with Staging
on:
workflow_dispatch:
schedule:
- cron: 0 5 * * sun

jobs:
promote-stg-to-main:
if: github.repository == 'ROCm/rocprofiler-compute'
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: |
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"

0 comments on commit 4c722b7

Please sign in to comment.