Spaces:
Build error
Build error
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 |
-
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
repo: Smart-Retrieval-Deployment
|
| 28 |
env:
|
| 29 |
-
|
| 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 }}
|
|
|
|
|
|
|
|
|