Skip to content

Commit

Permalink
Update sync-to-deployment-fork.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
xKhronoz authored Jan 25, 2024
1 parent 11d4af2 commit fe8f289
Showing 1 changed file with 7 additions and 18 deletions.
25 changes: 7 additions & 18 deletions .github/workflows/sync-to-deployment-fork.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,15 @@ on:
# - cron: '*/30 * * * *' # every 30 minutes
workflow_dispatch: # on button click

env:
REQUEST_BODY: |
branch: 'main',
headers: {
'X-GitHub-Api-Version': '2022-11-28'
}
jobs:
sync-deployment-fork:
runs-on: ubuntu-latest
steps:
- uses: octokit/[email protected]
id: sync_deployment_fork
with:
route: POST /repos/{owner}/{repo}/merge-upstream
body: ${{ toJSON(env.REQUEST_BODY) }}
owner: JTC-Smart-Retrieval
repo: Smart-Retrieval-Deployment
- name: Checkout repository
uses: actions/checkout@v2

- name: Sync fork with upstream
run: |
gh api -X POST /repos/JTC-Smart-Retrieval/Smart-Retrieval-Deployment/merge-upstream -f branch='main'
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
- run: "echo Sync Fork Success!: '${{ steps.sync_deployment_fork.outputs.data }}'"
- run: "echo Sync Fork Failed. Request failed with status '${{ steps.sync_deployment_fork.outputs.status }}'"
if: ${{ failure() }}
GH_TOKEN: ${{ secrets.PAT }}

0 comments on commit fe8f289

Please sign in to comment.