Update data #1103
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: Update data | |
on: | |
schedule: | |
- cron: '0 5 * * *' | |
workflow_dispatch: | |
inputs: | |
category: | |
type: choice | |
description: What to load | |
options: | |
- all | |
- areas | |
- issues | |
- prs | |
- prs-wait | |
- failed-jobs | |
- retried-prs | |
- workflow-status | |
permissions: | |
contents: write | |
pages: write | |
id-token: write | |
concurrency: | |
group: "update-date" | |
cancel-in-progress: false | |
jobs: | |
update: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
cache: 'maven' | |
- id: report | |
env: | |
GITHUB_OAUTH: ${{ secrets.GITHUB_TOKEN }} | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
./update-data.sh ${{ github.event.inputs.category }} | |
if ( ! git diff --exit-code &>/dev/null ); then | |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git config --global user.name "github-actions[bot]" | |
git add --all | |
git commit -m "Updated data" | |
git push | |
fi | |
deploy: | |
uses: ./.github/workflows/pages.yml | |
needs: [update] |