2022-01-10 20:07:44 +00:00
|
|
|
name: Sync Back to Development
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
|
2022-12-08 18:00:33 +00:00
|
|
|
# The section is needed to drop the default write-all permissions for all jobs
|
|
|
|
# that are granted on `push` event. By specifying any permission explicitly
|
|
|
|
# all others are set to none. By using the principle of least privilege the damage a compromised
|
|
|
|
# workflow can do (because of an injection or compromised third party tool or
|
|
|
|
# action) is restricted. Adding labels to issues, commenting
|
|
|
|
# on pull-requests, etc. may need additional permissions:
|
|
|
|
#
|
|
|
|
# Syntax for this section:
|
|
|
|
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
|
|
|
|
#
|
|
|
|
# Reference for how to assign permissions on a job-by-job basis:
|
|
|
|
# https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs
|
|
|
|
#
|
|
|
|
# Reference for available permissions that we can enable if needed:
|
|
|
|
# https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token
|
|
|
|
permissions: {}
|
|
|
|
|
2022-01-10 20:07:44 +00:00
|
|
|
jobs:
|
|
|
|
sync-branches:
|
2022-12-08 18:00:33 +00:00
|
|
|
# The job needs to be able to pull the code and create a pull request.
|
|
|
|
permissions:
|
|
|
|
contents: read # for actions/checkout
|
|
|
|
pull-requests: write # to create pull request
|
|
|
|
|
2022-01-10 20:07:44 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
name: Syncing branches
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2024-05-11 15:47:44 +00:00
|
|
|
uses: actions/checkout@v4.1.5
|
2022-01-10 20:07:44 +00:00
|
|
|
- name: Opening pull request
|
2022-12-13 22:01:35 +00:00
|
|
|
run: gh pr create -B development -H master --title 'Sync master back into development' --body 'Created by Github action' --label 'internal'
|
|
|
|
env:
|
2022-01-10 20:07:44 +00:00
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|