π Template Sync #2
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: π Template Sync | |
on: | |
schedule: | |
- cron: "0 0 1 * *" # π Run monthly on the 1st at 00:00 UTC | |
# manual trigger | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
repo-sync: | |
name: π Sync Repository | |
runs-on: ubuntu-latest | |
# https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs | |
permissions: | |
actions: write | |
contents: write | |
pull-requests: write | |
steps: | |
# To use this repository's private action, you must check out the repository | |
- name: π₯ Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.REPO_SYNC_TOKEN }} | |
- name: π Sync Template | |
uses: xesrevinu/actions-template-sync@v3.1.3 | |
with: | |
sync_token: ${{ secrets.REPO_SYNC_TOKEN }} | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
source_repo_path: opraying/worker-starter | |
is_pr_cleanup: true | |
upstream_branch: main | |
pr_labels: π template-sync | |
- name: π Report Sync Status | |
if: always() | |
run: | | |
if [ ${{ job.status }} == 'success' ]; then | |
echo "β Template sync completed successfully!" | |
else | |
echo "β Template sync failed. Please check the logs for details." | |
fi |