Skip to content

Commit

Permalink
Merge pull request #1397 from grafana/jdb/2023-11-use-github-action
Browse files Browse the repository at this point in the history
Use versioned action to update `make-docs` procedure
  • Loading branch information
jdbaldry authored Nov 6, 2023
2 parents a7b7680 + f5e733f commit 812e0a6
Showing 1 changed file with 7 additions and 18 deletions.
25 changes: 7 additions & 18 deletions .github/workflows/update-make-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,15 @@ name: Update `make docs` procedure
on:
schedule:
- cron: '0 7 * * 1-5'
workflow_dispatch:
jobs:
main:
if: github.repository == 'grafana/k6-docs'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- 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 "[email protected]"
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 type/docs || true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v4
- uses: grafana/writers-toolkit/update-make-docs@update-make-docs/v1
with:
pr_options: >
--label type/docs
trace: true

0 comments on commit 812e0a6

Please sign in to comment.