oncall-engine/.github/workflows/update-make-docs.yml
github-actions[bot] 6fbc7bebda
Update make docs procedure (#3235)
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Co-authored-by: grafanabot <bot@grafana.com>
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
2023-11-01 11:05:51 +00:00

27 lines
1,009 B
YAML

name: Update `make docs` procedure
"on":
schedule:
- cron: "0 7 * * 1-5"
jobs:
main:
if: github.repository == 'grafana/oncall'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Update procedure
run: |
BRANCH=update-make-docs
git checkout -b "${BRANCH}"
curl -s -Lo docs/docs.mk https://raw.githubusercontent.com/grafana/writers-toolkit/main/docs/docs.mk
curl -s -Lo docs/make-docs https://raw.githubusercontent.com/grafana/writers-toolkit/main/docs/make-docs
if git diff --exit-code; then exit 0; fi
git add .
git config --local user.email "bot@grafana.com"
git config --local user.name "grafanabot"
git commit -m "Update \`make docs\` procedure"
git push -v origin "refs/heads/${BRANCH}"
gh pr create --fill --label "pr:no changelog" || true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}