Skip to content

Commit

Permalink
ci: DOC-1508 fix GitHub action issue (#4973) (#4977)
Browse files Browse the repository at this point in the history
* ci: fix GitHub action issue

* ci: test

* ci: more test

* ci: use official GCP actions

* ci: ready for review

(cherry picked from commit 1a4f54e)

Co-authored-by: Karl Cardenas <[email protected]>
  • Loading branch information
1 parent e154d87 commit cfcebc7
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions .github/workflows/packs-data.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
# Runs at 5 minutes past the hour, every 6 hours.
- cron: "5 */6 * * *"
workflow_dispatch:

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_S3_ACCESS_KEY }}
Expand All @@ -26,13 +27,20 @@ jobs:
secretId: ${{ secrets.VAULT_SECRET_ID }}
secrets: /providers/github/organizations/spectrocloud/token?org_name=spectrocloud token | VAULT_GITHUB_TOKEN

- uses: actions-hub/gcloud@master
env:
PROJECT_ID: spectro-common-dev
APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
- 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:
args: cp gs://docs-education-automation/packs_inventory/packs_report.json ./packs_report.json
cli: gsutil
version: '>= 503.0.0'

- name: 'Get Packs Data'
run: |
gsutil cp gs://docs-education-automation/packs_inventory/packs_report.json ./packs_report.json
- name: Upload to S3
run: |
Expand All @@ -49,4 +57,4 @@ jobs:
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.'
SLACK_MESSAGE: 'The Deprecated Docs cron job that generates the `packs.json` file failed. Please check the logs for more details.'

0 comments on commit cfcebc7

Please sign in to comment.