Skip to content

Update sync-to-deployment-fork.yml #7

Update sync-to-deployment-fork.yml

Update sync-to-deployment-fork.yml #7

name: Sync to Deployment Fork
on:
push:
branches:
- main
# schedule:
# - 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
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() }}