diff --git a/.github/workflows/progress.yml b/.github/workflows/progress.yml index 6197bdf7a04..d881ebf5851 100644 --- a/.github/workflows/progress.yml +++ b/.github/workflows/progress.yml @@ -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 }} diff --git a/internal/cmd/progress-bot/run.sh b/internal/cmd/progress-bot/run.sh index 6314f897996..63673c45850 100755 --- a/internal/cmd/progress-bot/run.sh +++ b/internal/cmd/progress-bot/run.sh @@ -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"