-
Notifications
You must be signed in to change notification settings - Fork 176
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
47 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Sync master to OPAL Plus | ||
|
||
on: | ||
push: | ||
branches: | ||
- sync-test | ||
workflow_dispatch: | ||
|
||
jobs: | ||
sync: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Git configuration | ||
run: | | ||
git config --global user.name 'github-actions[bot]' | ||
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | ||
- name: Add opal-plus repository as remote | ||
run: | | ||
git remote add private https://github.com/permitio/opal-plus.git | ||
- name: Fetch private repository branches | ||
run: | | ||
git fetch private | ||
- name: Rebase master onto public-master | ||
run: | | ||
git rebase private/public-master | ||
- name: Push changes to public-master branch | ||
run: | | ||
git push private sync-test:public-master | ||
- name: Get Token | ||
id: get_workflow_token | ||
uses: peter-murray/workflow-application-token-action@v1 | ||
with: | ||
application_id: ${{ secrets.APPLICATION_ID }} | ||
application_private_key: ${{ secrets.APPLICATION_PRIVATE_KEY }} | ||
|
||
- name: Create Pull Request for opal-plus | ||
run: | | ||
gh pr create --assignee @me --reviewer "$GITHUB_ACTOR" --base sync-test --head public-master --title "Sync changes from public OPAL repository" --fill-verbose | ||
env: | ||
GITHUB_TOKEN: ${{ steps.get_workflow_token.outputs.token }} |