Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/sync-cms-to-repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ on:
repository_dispatch:
# sync_cms_to_repo is a bespoke type created for use with the CMS Webhook
types: [sync_cms_to_repo]
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
sync-to-repo:
runs-on: ubuntu-latest
Expand All @@ -19,13 +17,15 @@ jobs:
check-latest: true
- name: Install dependencies
run: npm install
- name: Setup git config
run: |
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
- name: Generate GitHub token
uses: navikt/github-app-token-generator@v1.1.1
id: get-token
with:
private-key: ${{ secrets.TOKENS_PRIVATE_KEY }}
app-id: ${{ secrets.TOKENS_APP_ID }}
- name: Sync CMS to repo
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ steps.get-token.outputs.token }}
CMS_CHANGES: ${{ toJson(github.event.client_payload) }}

run: bin/sync_cms_to_repo.sh