sync-fork.yml 562 B

123456789101112131415161718
  1. name: sync-fork
  2. on:
  3. schedule:
  4. - cron: '0 0 * * *'
  5. workflow_dispatch:
  6. jobs:
  7. sync:
  8. # Only set the topic `has-issrc-build-env-sync-token` if the secret is available
  9. if: contains(github.event.repository.topics, 'has-issrc-build-env-sync-token')
  10. runs-on: ubuntu-latest
  11. permissions:
  12. contents: write
  13. steps:
  14. - run: gh repo sync $REPOSITORY -b $BRANCH_NAME
  15. env:
  16. GITHUB_TOKEN: ${{ secrets.ISSRC_BUILD_ENV_SYNC_TOKEN }}
  17. REPOSITORY: ${{ github.repository }}
  18. BRANCH_NAME: ${{ github.ref_name }}