-
Notifications
You must be signed in to change notification settings - Fork 17
34 lines (32 loc) · 1.12 KB
/
get-members.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
name: Update list of members
on:
schedule:
- cron: '0 0 * * 1'
workflow_dispatch:
jobs:
get-members:
runs-on: ubuntu-latest
steps:
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.COMMIT_APP_ID }}
private-key: ${{ secrets.COMMIT_APP_PRIVATEKEY }}
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ steps.app-token.outputs.token }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
- run: composer install
working-directory: ./.github/workflows/get-members
- run: composer run get-members
working-directory: ./.github/workflows/get-members
env:
MAILCHIMP_API_KEY: ${{ secrets.MAILCHIMP_API_KEY }}
- name: Commit and push changes
run: |
git config user.name "osmbe-commit-bot[bot]"
git config user.email "182402131+osmbe-commit-bot[bot]@users.noreply.github.com"
git add _data/members.json
git diff-index --quiet HEAD -- || (git add . && git commit -m "Update list of members" && git push origin master)