Skip to content

Commit 54b5e78

Browse files
github-actions[bot]grafanabotjdbaldry
authored
Update make docs procedure (#5701)
* 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]>
1 parent ffccd0a commit 54b5e78

File tree

2 files changed

+5
-20
lines changed

2 files changed

+5
-20
lines changed

.github/workflows/update-make-docs.yml

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,11 @@ name: Update `make docs` procedure
22
on:
33
schedule:
44
- cron: '0 7 * * 1-5'
5+
workflow_dispatch:
56
jobs:
67
main:
8+
if: github.repository == 'grafana/agent'
79
runs-on: ubuntu-latest
810
steps:
9-
- name: Checkout repository
10-
uses: actions/checkout@v4
11-
12-
- name: Update procedure
13-
if: github.repository != 'grafana/writers-toolkit'
14-
run: |
15-
BRANCH=update-make-docs
16-
git checkout -b "${BRANCH}"
17-
curl -s -Lo docs/docs.mk https://raw.githubusercontent.com/grafana/writers-toolkit/main/docs/docs.mk
18-
curl -s -Lo docs/make-docs https://raw.githubusercontent.com/grafana/writers-toolkit/main/docs/make-docs
19-
if git diff --exit-code; then exit 0; fi
20-
git add .
21-
git config --local user.email "[email protected]"
22-
git config --local user.name "grafanabot"
23-
git commit -m "Update \`make docs\` procedure"
24-
git push -v origin "refs/heads/${BRANCH}"
25-
gh pr create --fill || true
26-
env:
27-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
11+
- uses: actions/checkout@v4
12+
- uses: grafana/writers-toolkit/update-make-docs@update-make-docs/v1

docs/make-docs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
#
3939
# - Imperfect implementation of container name.
4040
#
41-
# Faciliates running `make vale` and `make docs` at once.
41+
# Facilitates running `make vale` and `make docs` at once.
4242
# Container names are convenient for recognition in `docker ps` but the current implementation has more downsides than upsides.
4343
#
4444
# - Forced platform specification now that multiple architecture images exist.

0 commit comments

Comments
 (0)