Skip to content

Commit 6dcb171

Browse files
authored
ci: 👷 switch to using reusable workflow (#83)
1 parent aeca3d8 commit 6dcb171

File tree

1 file changed

+5
-32
lines changed

1 file changed

+5
-32
lines changed

.github/workflows/sync-files.yml

Lines changed: 5 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -7,35 +7,8 @@ on:
77

88
jobs:
99
sync:
10-
runs-on: ubuntu-latest
11-
steps:
12-
- uses: actions/create-github-app-token@v2
13-
id: app-token
14-
with:
15-
owner: ${{ github.repository_owner }}
16-
app-id: ${{ vars.SYNC_FILES_APP_ID }}
17-
private-key: ${{ secrets.SYNC_FILES_TOKEN }}
18-
19-
- name: Checkout Repository
20-
uses: actions/checkout@v4
21-
with:
22-
token: ${{ steps.app-token.outputs.token }}
23-
24-
# Taken from https://github.com/actions/create-github-app-token/
25-
- name: Get GitHub App User ID
26-
id: get-user-id
27-
run: echo "user-id=$(gh api "/users/${{ steps.app-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT"
28-
env:
29-
GH_TOKEN: ${{ steps.app-token.outputs.token }}
30-
31-
- name: Run GitHub File Sync
32-
uses: BetaHuhn/repo-file-sync-action@v1
33-
with:
34-
GH_INSTALLATION_TOKEN: ${{ steps.app-token.outputs.token }}
35-
ASSIGNEES: lwjohnst86
36-
IS_FINE_GRAINED: true
37-
GIT_USERNAME: ${{ steps.app-token.outputs.app-slug }}[bot]
38-
GIT_EMAIL: ${{ steps.get-user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com
39-
COMMIT_PREFIX: "chore(sync): :hammer: "
40-
COMMIT_EACH_FILE: false
41-
BRANCH_PREFIX: chore/python-package-sync
10+
uses: seedcase-project/.github/.github/workflows/reusable-sync-files.yml@main
11+
with:
12+
app-id: ${{ vars.SYNC_FILES_APP_ID }}
13+
secrets:
14+
sync-files-token: ${{ secrets.SYNC_FILES_TOKEN }}

0 commit comments

Comments
 (0)