sync-upstream #1932
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
name: sync-upstream | |
on: | |
schedule: | |
- cron: '0 * * * *' | |
# once every hour | |
workflow_dispatch: | |
inputs: | |
sync_test_mode: | |
description: 'Fork Sync Test Mode' | |
type: boolean | |
default: false | |
jobs: | |
sync_latest_from_upstream: | |
runs-on: ubuntu-latest | |
name: Sync latest commits from upstream repo | |
steps: | |
- name: Checkout target repo | |
uses: actions/checkout@v3 | |
with: | |
ref: main | |
persist-credentials: false | |
- name: Sync upstream changes | |
id: sync | |
uses: aormsby/[email protected] | |
with: | |
target_sync_branch: main | |
target_repo_token: ${{ secrets.UPSTREAM_SYNC }} | |
upstream_sync_branch: main | |
upstream_sync_repo: trustification/trustify | |
test_mode: ${{ inputs.sync_test_mode }} | |
- name: New commits found | |
if: steps.sync.outputs.has_new_commits == 'true' | |
run: echo "New commits were found to sync." |