Skip to content

Commit 8768a9e

Browse files
authored
Notify deployment app on push to default branch (#3)
1 parent 4d13221 commit 8768a9e

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Notify Deployment App
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
8+
jobs:
9+
notify-deployment-app:
10+
name: Notify deployment app of LMS update
11+
runs-on: ubuntu-latest
12+
# Only on the main repo, not forks
13+
if: github.repository == 'surgeventures/lms'
14+
15+
steps:
16+
- name: Generate GitHub App token
17+
id: app-token
18+
uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1
19+
with:
20+
app-id: ${{ secrets.FRESHA_LMS_UPDATE_NOTIFIER_APP_ID }}
21+
private-key: ${{ secrets.FRESHA_LMS_UPDATE_NOTIFIER_APP_PRIVATE_KEY }}
22+
owner: surgeventures
23+
repositories: app-launchpad
24+
25+
- name: Notify
26+
uses: peter-evans/repository-dispatch@28959ce8df70de7be546dd1250a005dd32156697 # v4.0.1
27+
with:
28+
token: ${{ steps.app-token.outputs.token }}
29+
repository: surgeventures/app-launchpad
30+
event-type: lms-update
31+
client-payload: '{"lms_commit_sha": "${{ github.sha }}"}'
32+
33+
- name: Log trigger
34+
run: |
35+
echo "Notified downstream app of LMS update for commit: ${{ github.sha }}"

0 commit comments

Comments
 (0)