progress_bot: use gcloud auth action (#44088)

* try new version of action

* git config

* git config in the docker image

* testing git config in image

* add comment

* new tag

* auth with gcloud action

* remove envvar
This commit is contained in:
Dave Try 2022-11-08 12:25:27 -05:00 committed by GitHub
parent 74d5470061
commit fec0f4a5c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 6 deletions

View File

@ -22,17 +22,20 @@ jobs:
runs-on: ubuntu-latest
name: Report the last 24h of CHANGELOG to the progress channel
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 1000
- name: Set up GCP key
run: |
echo ${{ secrets.PROGRESS_BOT_GCP_ACCOUNT_KEY }} | base64 -d > progress-bot-credentials.json
- name: Configure gcloud
uses: google-github-actions/auth@v0
with:
credentials_json: ${{ secrets.PROGRESS_BOT_GCP_ACCOUNT_KEY }}
service_account: 'progress-bot@sourcegraph-dev.iam.gserviceaccount.com'
- name: Report to Slack
uses: docker://sourcegraph/progress-bot:latest@sha256:93ceab2a92d8464eccf367d47e8d585307d7ff36ab57e0240c3d68b4349c4e57
uses: docker://sourcegraph/progress-bot:latest@sha256:adbce46dde34527bcb27027a552c76cc0622683297dd935111fe6e1067c53efa
env:
SINCE: ${{ github.event.inputs.since || '24h' }}
DRY: ${{ github.event.inputs.dry || 'false' }}
CHANNEL: ${{ github.event.inputs.channel || 'progress' }}
GOOGLE_APPLICATION_CREDENTIALS: progress-bot-credentials.json
SLACK_API_TOKEN: ${{ secrets.PROGRESS_BOT_SLACK_API_TOKEN }}

View File

@ -2,5 +2,9 @@
set -euo pipefail
# Required to stop .git ownership error
# https://github.com/actions/runner/issues/2033
git config --global --add safe.directory /github/workspace
git blame -w --line-porcelain -- CHANGELOG.md |
progress-bot -since="$SINCE" -dry="$DRY" -channel="$CHANNEL"