sync #45121
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: clabot@sourcegraph-ci.iam.gserviceaccount.com | |
GOOGLE_IMPERSONATE_USER: robert@sourcegraph.com | |
# 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 sourcegraph-bot-github@sourcegraph.com | |
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 |