Write GitHub Data To Google Cloud Storage #150
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: Write GitHub Data To Google Cloud Storage | |
on: | |
schedule: | |
- cron: "15 0 * * *" | |
workflow_dispatch: | |
permissions: | |
contents: read | |
id-token: write | |
jobs: | |
github-to-gcs: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Google Cloud Auth | |
uses: google-github-actions/auth@6fc4af4b145ae7821d527454aa9bd537d1f2dc5f # v2.1.7 | |
with: | |
project_id: "groovy-momentum-434802-g9" | |
workload_identity_provider: ${{ secrets.WORKLOAD_IDENTITY_PROVIDER }} | |
- name: Run CronJob | |
run: go run cmd/cronjob/main.go | |
notify-on-failure: | |
needs: github-to-gcs | |
runs-on: ubuntu-latest | |
if: ${{ !success() }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Send Notification Email | |
run: go run cmd/sendemail/main.go | |
env: | |
GMAIL_APP_PASSWORD: ${{ secrets.GMAIL_APP_PASSWORD }} | |
WORKFLOW_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} |