Skip to content

Update crashes informations from Telemetry #4

Update crashes informations from Telemetry

Update crashes informations from Telemetry #4

Workflow file for this run

name: Update crashes informations from Telemetry
on:
schedule:
- cron: '0 3 * * *'
push:
branches: ["main"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
# Build job
build:
runs-on: ubuntu-latest
env:
REDASH_API_KEY: ${{ secrets.REDASH_API_KEY }}
steps:
- uses: actions/checkout@v3
- name: Install python-deps
run: |
pip3 install -r requirements.txt
- name: Setup Pages
id: pages
uses: actions/configure-pages@v3
- name: Cache JSON database
id: cache-json-database
uses: actions/cache@v3
with:
path: json-data.zip
key: json-database-${{ github.run_id }}
restore-keys: json-database
- name: Download bootstrap JSON from release if no artifact found
if: ${{ !steps.cache-json-database.outputs.cache-hit || steps.cache-json-database.outputs.cache-primary-key != steps.cache-json-database.outputs.cache-matched-key }}
run: |
bootstrap_url=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/releases/download/bootstrap-json/json-data.zip
echo "Do bootstrap from ${bootstrap_url}"
curl -o json-data.zip --fail -sL ${bootstrap_url}
- name: Extract previous JSON
run: unzip json-data.zip
- name: Extract crash ping and generate web pages
run: python3 generate.py
- name: Collect new JSON
run: zip -r9 json-data.zip *-reports.json *-stats.json
- name: Upload existing json reports
uses: actions/upload-artifact@v3
with:
name: json-data
path: json-data.zip
- name: Upload HTML artifact
uses: actions/upload-pages-artifact@v1
with:
path: ./_dist/
# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2