-
Notifications
You must be signed in to change notification settings - Fork 8
50 lines (43 loc) · 1.44 KB
/
sync.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: sync
on:
schedule:
# every 30 minutes
- cron: '*/30 * * * *'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.18.x
- name: set up gcp key
run: echo ${{ secrets.CLABOT_CREDENTIALS }} | base64 -d > clabot-credentials.json
- run: go run ./tools/sync
env:
# credentials and access
GOOGLE_APPLICATION_CREDENTIALS: clabot-credentials.json
GOOGLE_TARGET_SERVICE_ACCOUNT: [email protected]
GOOGLE_IMPERSONATE_USER: [email protected]
# log output
SRC_LOG_FORMAT: 'console'
SRC_DEVELOPMENT: 'true'
- name: update .clabot-config
run: |
if git diff --quiet; then
echo "No diff, exiting"
else
git config user.name sourcegraph-bot
git config user.email [email protected]
git add .
git commit -am "clabot: sync contributors that have signed the CLA"
git push
fi
report_failure:
needs: sync
if: ${{ failure() }}
uses: sourcegraph/workflows/.github/workflows/report-job-failure.yml@main
secrets: inherit