Skip to content

Duty Report

Duty Report #681

name: Duty Report
on:
# Allows manual triggering of the workflow
workflow_dispatch:
# Runs every hour
schedule:
- cron: '0 * * * *'
permissions: {}
jobs:
duty-report:
runs-on: ubuntu-latest
if: github.repository == 'coreruleset/coreruleset'
permissions:
contents: write
steps:
- name: "Checkout gh-pages branch (sparse, only the files related to duty report)"
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
ref: 'gh-pages'
sparse-checkout: |
scripts/generate-duty-report.sh
docs/duty.html
- name: "Generate duty report"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
./scripts/generate-duty-report.sh ./docs/duty.html 1
- name: "Commit and push"
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add ./docs/duty.html
git commit -m "Duty report - $(date -u +"%Y-%m-%d %H:%M:%S")"
git push