Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[version-4-4] ci: DOC-1508 fix GitHub action issue (#4973) #4980

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.'
Loading