khronoz commited on
Commit
fe8f289
·
unverified ·
1 Parent(s): 11d4af2

Update sync-to-deployment-fork.yml

Browse files
.github/workflows/sync-to-deployment-fork.yml CHANGED
@@ -7,26 +7,15 @@ on:
7
  # - cron: '*/30 * * * *' # every 30 minutes
8
  workflow_dispatch: # on button click
9
 
10
- env:
11
- REQUEST_BODY: |
12
- branch: 'main',
13
- headers: {
14
- 'X-GitHub-Api-Version': '2022-11-28'
15
- }
16
-
17
  jobs:
18
  sync-deployment-fork:
19
  runs-on: ubuntu-latest
20
  steps:
21
- - uses: octokit/request-action@v2.1.9
22
- id: sync_deployment_fork
23
- with:
24
- route: POST /repos/{owner}/{repo}/merge-upstream
25
- body: ${{ toJSON(env.REQUEST_BODY) }}
26
- owner: JTC-Smart-Retrieval
27
- repo: Smart-Retrieval-Deployment
28
  env:
29
- GITHUB_TOKEN: ${{ secrets.PAT }}
30
- - run: "echo Sync Fork Success!: '${{ steps.sync_deployment_fork.outputs.data }}'"
31
- - run: "echo Sync Fork Failed. Request failed with status '${{ steps.sync_deployment_fork.outputs.status }}'"
32
- if: ${{ failure() }}
 
7
  # - cron: '*/30 * * * *' # every 30 minutes
8
  workflow_dispatch: # on button click
9
 
 
 
 
 
 
 
 
10
  jobs:
11
  sync-deployment-fork:
12
  runs-on: ubuntu-latest
13
  steps:
14
+ - name: Checkout repository
15
+ uses: actions/checkout@v2
16
+
17
+ - name: Sync fork with upstream
18
+ run: |
19
+ gh api -X POST /repos/JTC-Smart-Retrieval/Smart-Retrieval-Deployment/merge-upstream -f branch='main'
 
20
  env:
21
+ GH_TOKEN: ${{ secrets.PAT }}