From af093a85f7dd5be4f2631f2655360d45ad9dee9f Mon Sep 17 00:00:00 2001 From: itowlson Date: Thu, 3 Apr 2025 13:21:34 +1300 Subject: [PATCH] GitHub action to update Spin CLI reference Signed-off-by: itowlson --- .github/workflows/update-cli-reference.yml | 56 ++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 .github/workflows/update-cli-reference.yml diff --git a/.github/workflows/update-cli-reference.yml b/.github/workflows/update-cli-reference.yml new file mode 100644 index 00000000..a0224350 --- /dev/null +++ b/.github/workflows/update-cli-reference.yml @@ -0,0 +1,56 @@ +name: Bump Spin + +on: + workflow_dispatch: + # repository_dispatch: + # types: + # - spin-release + +jobs: + create-pr: + name: Create PR with CLI reference bumped + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Download Spin + uses: fermyon/actions/spin/setup@v1 + with: + version: canary # for testing + + - name: Create CLI reference front matter + run: | + cat >./content/v3/cli-reference.md << EOF + title = "Command Line Reference" + template = "main" + date = "2025-01-01T00:00:01Z" + [extra] + url = "https://github.com/spinframework/spin-docs/blob/main/content/v3/cli-reference.md" + + --- + EOF + + - name: Generate reference doc + run: ./spin maintenance generate-reference >>cli-reference.md + + - name: Import GPG key + uses: crazy-max/ghaction-import-gpg@v6 + with: + gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} + passphrase: ${{ secrets.PASSPHRASE }} + git_user_signingkey: true + git_commit_gpgsign: true + + - name: Create pull request + uses: peter-evans/create-pull-request@v7 + with: + commit-message: "Update Spin CLI reference to latest" + title: "Update Spin CLI reference to latest" + body: "Update Spin CLI reference to latest" + branch: bump-spin-cli-reference + base: main + delete-branch: true + committer: spinframeworkbot <202838904+spinframeworkbot@users.noreply.github.com> + author: spinframeworkbot <202838904+spinframeworkbot@users.noreply.github.com> + signoff: true + token: ${{ secrets.PAT }} \ No newline at end of file