Skip to content

Add a workflow to merge release into master #6217

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

Merged
merged 2 commits into from
May 4, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/workflows/merge-release-branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Merge Release Into Master

on: repository_dispatch
Copy link
Member

Choose a reason for hiding this comment

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

nit feel free to ignore:
We can set types: here if we want to restrict the manual trigger even further with a specific event_type value in the webhook payload.

on:
  repository_dispatch:
    types: [sdk-release-merge]

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will add this when/if we trigger from a webhook. We'll use the button in the Github UI for now.


jobs:
merge_to_master:
runs-on: ubuntu-latest
# Allow GITHUB_TOKEN to have write permissions
permissions:
contents: write
Copy link
Member

Choose a reason for hiding this comment

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

Is the goal here to grant GITHUB_TOKEN with default permissions (without write access) and add write access in the workflow?

steps:
- name: Merge to master
uses: actions/[email protected]
Copy link
Member

Choose a reason for hiding this comment

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

Looks like the latest version is v6 now (includes breaking changes). Worth checking if we can use one of the recent versions here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will try to bump to v6

with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
github.repos.merge({
owner: context.repo.owner,
repo: context.repo.repo,
base: 'master',
head: 'release'
})