This repository has been archived by the owner on Jul 21, 2023. It is now read-only.
Post JSON to Ops Eng Report #799
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: Post JSON to Ops Eng Report | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 5 * * *" | |
jobs: | |
post-data-to-opseng-reports: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 3.1.0 | |
bundler-cache: true | |
- run: bundle config set without "development test" | |
- run: bundle install | |
- run: bin/repository-checker | |
env: | |
ADMIN_GITHUB_TOKEN: ${{ secrets.ADMIN_GITHUB_TOKEN }} | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
architecture: "x64" | |
cache: "pip" | |
- run: python3 -m pip install requests cryptography | |
- run: python3 scripts/python/encrypt_send_data.py | |
env: | |
OPERATIONS_ENGINEERING_REPORTS_API_KEY: ${{ secrets.OPERATIONS_ENGINEERING_REPORTS_API_KEY }} | |
OPERATIONS_ENGINEERING_REPORTS_HOST: ${{ secrets.OPERATIONS_ENGINEERING_REPORTS_HOST }} | |
ENCRYPTION_KEY: ${{ secrets.ENCRYPTION_KEY }} | |
- run: rm private_data.json > /dev/null 2>&1 | |
- run: rm public_data.json > /dev/null 2>&1 | |
- name: Report failure to Slack | |
if: always() | |
uses: ravsamhq/notify-slack-action@v2 | |
with: | |
status: ${{ job.status }} | |
notify_when: "failure" | |
notification_title: "Failed GitHub Action Run" | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} |