Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): add sync branch workflow for storage-refactor #6334

Merged
merged 10 commits into from Jul 18, 2022
31 changes: 31 additions & 0 deletions .github/workflows/sync_branch.yaml
@@ -0,0 +1,31 @@
name: Sync storage-refactor
on:
schedule:
- cron: 0 23 * * 1-5 # Week-daily at 23:00 UTC / 16:00 PST
workflow_dispatch: {} # Allow manual triggering

jobs:
sync-storage-refactor:
runs-on: ubuntu-latest
name: Syncing storage-refactor
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Node
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure, it is from the README of the Action: https://github.com/marketplace/actions/sync-branches. So I'm guessing yes?

uses: actions/setup-node@v3
with:
node-version: 16
- name: Get change notes
id: changes
run: echo ::set-output name=change_notes::$(git log storage-refactor..main --oneline --pretty=format:%s)
- name: Opening pull request
id: pull
# https://github.com/marketplace/actions/sync-branches
uses: tretuna/sync-branches@1.4.0
with:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
FROM_BRANCH: "main"
TO_BRANCH: "storage-refactor"
REVIEWERS: '["noahdietz", "cloud-storage-dpe"]'
PULL_REQUEST_TITLE: "chore: sync main to storage-refactor"
PULL_REQUEST_BODY: "${{ steps.changes.outputs.change_notes }}"