Skip to content

Synchronize Source of Truth #58

Synchronize Source of Truth

Synchronize Source of Truth #58

Workflow file for this run

name: Synchronize Source of Truth
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
synchronize:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout Repository
uses: actions/checkout@v6
- name: Fetch Sync Branch Reference
run: |
git fetch origin refs/heads/sync/source-of-truth:refs/remotes/origin/sync/source-of-truth || true
- name: Create GitHub App Token
uses: actions/create-github-app-token@v3
id: app-token
with:
client-id: ${{ secrets.BOT_CLIENT_ID }}
private-key: ${{ secrets.BOT_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
repositories: ${{ github.event.repository.name }},gp-source-of-truth
- name: Get GitHub App User ID
id: get-user-id
run: echo "user-id=$(gh api "/users/${{ steps.app-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT"
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
- name: Synchronize Source of Truth
uses: GraphicalPlayground/gp-actions/sync/source-of-truth@main
with:
sot-repository: 'GraphicalPlayground/gp-source-of-truth'
sot-branch: 'main'
sot-token: ${{ steps.app-token.outputs.token }}
commit-username: "${{ steps.app-token.outputs.app-slug }}[bot]"
commit-email: "${{ steps.get-user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com"
license: 'Apache 2.0'
allow-templatization: true
# file-to-sync: ''
push-changes: true
create-pr: true