-
Notifications
You must be signed in to change notification settings - Fork 3
36 lines (32 loc) · 1.23 KB
/
contenful-push.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: deploy
on:
repository_dispatch:
types: [contentful_update]
permissions:
id-token: write
contents: write # This is required for actions/checkout
concurrency:
group: contentful_updates
jobs:
commit_changes:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
with:
token: ${{ secrets.CONTENTFUL_GITHUB_TOKEN }}
fetch-depth: 0
- name: Create changes from webhook payload
run: |
curl --request GET https://api.contentful.com/spaces/${{ github.event.client_payload.spaceID }}/users/${{ github.event.client_payload.userID }} -H 'Authorization: Bearer ${{ secrets.CONTENTFUL_TOKEN }}' | jq '.firstName + " " + .lastName + " made a change to contentful"' >> CONTENTFUL_CHANGELOG.md
- name: Import GPG
uses: crazy-max/[email protected]
with:
gpg_private_key: ${{ secrets.SIGNING_KEY }}
- name: Commit and Push Changes
run: |
git config user.email "[email protected]"
git config user.name "SPP Machine User"
git config user.signingkey 79DDAC12EE2E036D
git config commit.gpgsign true
git commit -am "feat: User changes to contentful content model"
git push