github.com/netdata/go.d.plugin@v0.58.1/.github/workflows/generate-integrations-docs.yml (about) 1 --- 2 # CI workflow used to generate documentation from integrations/integrations.js. 3 4 5 name: Generate Go Integrations Documentation 6 on: 7 workflow_dispatch: null 8 schedule: 9 - cron: "0 8-23/3 * * *" # every 3rd hour from 8 through 23 10 concurrency: # This keeps multiple instances of the job from running concurrently for the same ref. 11 group: generate-go-integrations-docs-${{ github.ref }} 12 cancel-in-progress: true 13 jobs: 14 generate-go-integrations-documentation: 15 name: Generate Go Integrations Documentation 16 runs-on: ubuntu-latest 17 if: github.repository == 'netdata/go.d.plugin' 18 steps: 19 - name: Get the latest go release tag 20 id: go-tag 21 run: | 22 tag="$(curl "https://github.com/netdata/go.d.plugin/releases/latest" -s -L -I -o /dev/null -w '%{url_effective}' | grep -m 1 -o '[^/]*$')" 23 echo "latest tag is ${tag}" 24 echo "releasetag=${tag}" >> $GITHUB_ENV 25 - name: Checkout Go repo 26 id: checkout-go 27 uses: actions/checkout@v4 28 with: 29 fetch-depth: 1 30 submodules: recursive 31 ref: ${{ steps.go-tag.outputs.releasetag }} 32 - name: Get integrations.js 33 run: | 34 curl https://raw.githubusercontent.com/netdata/netdata/master/integrations/integrations.js --create-dirs -o ./integrations/integrations.js 35 - name: Get gen_docs_integrations.py 36 run: | 37 curl https://raw.githubusercontent.com/netdata/netdata/master/integrations/gen_docs_integrations.py --create-dirs -o ./integrations/gen_docs_integrations.py 38 - name: Generate Go Integrations Documentation 39 id: generate 40 run: | 41 python3 integrations/gen_docs_integrations.py 42 - name: Remove integrations dir 43 run: | 44 rm -rf integrations/ 45 - name: Create PR 46 id: create-pr 47 uses: peter-evans/create-pull-request@v6 48 with: 49 token: ${{ secrets.GITHUB_TOKEN }} 50 commit-message: Generate Integrations Documentation 51 branch: integrations-docs 52 title: Integrations Documentation 53 base: ${{ github.head_ref }} 54 body: | 55 Generate Documentation from `integrations/integrations.js` based on the latest code. 56 57 This PR was auto-generated by 58 `.github/workflows/generate-integrations-docs.yml`.