Skip to content

Use automatic GitHub token for sync permissions #9

Use automatic GitHub token for sync permissions

Use automatic GitHub token for sync permissions #9

Workflow file for this run

name: "Repo Sync"
on:
schedule:
# at 07:15 AM every day
- cron: "15 7 * * *"
pull_request:
branches:
- repo-sync
workflow_dispatch:
jobs:
repo-sync:
runs-on: ubuntu-latest
name: Repo sync
steps:
# https://github.com/marketplace/actions/github-app-token
- name: Create GitHub App installation token
uses: actions/create-github-app-token@78e5f2ddc08efcb88fbbee6cfa3fed770ba550c3 # v1.9.1
id: create_token
with:
app-id: ${{ vars.FLOWZONE_APP_ID }}
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
# https://github.com/actions/checkout
- name: Checkout
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4
with:
persist-credentials: false
# https://github.com/repo-sync/github-sync
- name: Repo sync
uses: repo-sync/github-sync@3832fe8e2be32372e1b3970bbae8e7079edeec88 # v2.3.0
with:
source_repo: https://git.yoctoproject.org/git/poky
source_branch: "*" # Sync all branches
destination_branch: "*" # Sync all branches
github_token: ${{ secrets.GITHUB_TOKEN }}
sync_tags: "true"