Skip to content

Commit

Permalink
ci: ready for review
Browse files Browse the repository at this point in the history
  • Loading branch information
karl-cardenas-coding committed Dec 11, 2024
1 parent e2fba45 commit 7e32bee
Showing 1 changed file with 9 additions and 19 deletions.
28 changes: 9 additions & 19 deletions .github/workflows/packs-data.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ on:
# Runs at 5 minutes past the hour, every 6 hours.
- cron: "5 */6 * * *"
workflow_dispatch:
push:
branches-ignore: "master"

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -44,27 +42,19 @@ jobs:
run: |
gsutil cp gs://docs-education-automation/packs_inventory/packs_report.json ./packs_report.json
# - uses: actions-hub/gcloud@master
# env:
# PROJECT_ID: spectro-common-dev
# APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
# with:
# args: cp gs://docs-education-automation/packs_inventory/packs_report.json ./packs_report.json
# cli: gsutil

- name: Upload to S3
run: |
aws s3 cp ./packs_report.json s3://docs.spectrocloud.com/packs-data/
aws cloudfront create-invalidation --distribution-id ${{ secrets.DISTRIBUTION_ID }} --paths "/packs-data/packs_report.json"
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 Deprecated Docs cron job that generates the `packs.json` file failed. Please check the logs for more details.'

0 comments on commit 7e32bee

Please sign in to comment.