Skip to content

Commit

Permalink
Update make docs procedure (#5701)
Browse files Browse the repository at this point in the history
* Update `make docs` procedure

* Use versioned action to update `make-docs` procedure

https://github.com/grafana/writers-toolkit/blob/main/update-make-docs/action.yml

Signed-off-by: Jack Baldry <[email protected]>

---------

Signed-off-by: Jack Baldry <[email protected]>
Co-authored-by: grafanabot <[email protected]>
Co-authored-by: Jack Baldry <[email protected]>
  • Loading branch information
3 people authored Nov 6, 2023
1 parent ffccd0a commit 54b5e78
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 20 deletions.
23 changes: 4 additions & 19 deletions .github/workflows/update-make-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,11 @@ name: Update `make docs` procedure
on:
schedule:
- cron: '0 7 * * 1-5'
workflow_dispatch:
jobs:
main:
if: github.repository == 'grafana/agent'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Update procedure
if: github.repository != 'grafana/writers-toolkit'
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 || true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v4
- uses: grafana/writers-toolkit/update-make-docs@update-make-docs/v1
2 changes: 1 addition & 1 deletion docs/make-docs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#
# - Imperfect implementation of container name.
#
# Faciliates running `make vale` and `make docs` at once.
# Facilitates running `make vale` and `make docs` at once.
# Container names are convenient for recognition in `docker ps` but the current implementation has more downsides than upsides.
#
# - Forced platform specification now that multiple architecture images exist.
Expand Down

0 comments on commit 54b5e78

Please sign in to comment.