Skip to content

Commit 92bec45

Browse files
committed
GitHub action to update Spin CLI reference
Signed-off-by: itowlson <[email protected]>
1 parent 356b8bc commit 92bec45

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Bump Spin
2+
3+
on:
4+
workflow_dispatch:
5+
# repository_dispatch:
6+
# types:
7+
# - spin-release
8+
9+
jobs:
10+
create-pr:
11+
name: Create PR with CLI reference bumped
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Download Spin
17+
uses: fermyon/actions/spin/setup@v1
18+
version: canary # for testing
19+
20+
- name: Create CLI reference front matter
21+
run: |
22+
cat >./content/v3/cli-reference.md << EOF
23+
title = "Command Line Reference"
24+
template = "main"
25+
date = "2025-01-01T00:00:01Z"
26+
[extra]
27+
url = "https://github.com/spinframework/spin-docs/blob/main/content/v3/cli-reference.md"
28+
29+
---
30+
EOF
31+
32+
- name: Generate reference doc
33+
run: ./spin maintenance generate-reference >>cli-reference.md
34+
35+
- name: Import GPG key
36+
uses: crazy-max/ghaction-import-gpg@v6
37+
with:
38+
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
39+
passphrase: ${{ secrets.PASSPHRASE }}
40+
git_user_signingkey: true
41+
git_commit_gpgsign: true
42+
43+
- name: Create pull request
44+
uses: peter-evans/create-pull-request@v7
45+
with:
46+
commit-message: "Update Spin CLI reference to latest"
47+
title: "Update Spin CLI reference to latest"
48+
body: "Update Spin CLI reference to latest"
49+
branch: bump-spin-cli-reference
50+
base: main
51+
delete-branch: true
52+
committer: spinframeworkbot <[email protected]>
53+
author: spinframeworkbot <[email protected]>
54+
signoff: true
55+
token: ${{ secrets.PAT }}

0 commit comments

Comments
 (0)