Skip to content

Commit

Permalink
ci: use official GCP actions
Browse files Browse the repository at this point in the history
  • Loading branch information
karl-cardenas-coding committed Dec 11, 2024
1 parent 593c4d6 commit e2fba45
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions .github/workflows/packs-data.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,20 @@ jobs:
secretId: ${{ secrets.VAULT_SECRET_ID }}
secrets: /providers/github/organizations/spectrocloud/token?org_name=spectrocloud token | VAULT_GITHUB_TOKEN


- uses: 'google-github-actions/auth@v2'
with:
project_id: spectro-common-dev
credentials_json: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
cleanup_credentials: true


- name: 'Set up Cloud SDK'
uses: 'google-github-actions/setup-gcloud@v2'
with:
version: '>= 363.0.0'
version: '>= 503.0.0'

- name: 'Get Packs Data'
run: |
gsutil cp gs://docs-education-automation/packs_inventory/packs_report.json ./packs_report.json
# - uses: actions-hub/gcloud@master
# env:
Expand All @@ -57,12 +59,12 @@ jobs:
aws s3 cp ./packs_report.json s3://docs-latest.spectrocloud.com/packs-data/
aws cloudfront create-invalidation --distribution-id ${{ secrets.LATEST_DOCS_DISTRIBUTION_ID }} --paths "/packs-data/packs_report.json"
- name: Slack Notification
if: ${{ failure() }}
uses: rtCamp/[email protected]
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_PRIVATE_TEAM_WEBHOOK }}
SLACK_USERNAME: "spectromate"
SLACK_ICON_EMOJI: ":robot:"
SLACK_COLOR: ${{ job.status }}
SLACK_MESSAGE: 'The Docs cron job that generates the `packs.json` file failed. Please check the logs for more details.'
# - name: Slack Notification
# if: ${{ failure() }}
# uses: rtCamp/[email protected]
# env:
# SLACK_WEBHOOK: ${{ secrets.SLACK_PRIVATE_TEAM_WEBHOOK }}
# SLACK_USERNAME: "spectromate"
# SLACK_ICON_EMOJI: ":robot:"
# SLACK_COLOR: ${{ job.status }}
# SLACK_MESSAGE: 'The Docs cron job that generates the `packs.json` file failed. Please check the logs for more details.'

0 comments on commit e2fba45

Please sign in to comment.