Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/slack-cli-generate-docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Generate Slack CLI Docs

on:
workflow_dispatch:
Comment on lines +3 to +4
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👁️‍🗨️ thought: Adding on "version" tags might be interesting! Otherwise we will need to add this to our release runbooks.

📣 ramble: So open to saving this for follow ups of course.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗣️ note: Ugh that was more clear in mind... I meant to suggest "on new tagged releases the workflow should run" but I forget the syntax!


jobs:
update-docs:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔐 todo: This'll also need some set of permissions. Do let me know if I can help with this!

runs-on: ubuntu-latest

steps:

- name: Install Slack CLI
run: |
curl -fsSL https://downloads.slack-edge.com/slack-cli/install.sh | bash

- name: Generate a GitHub token
id: ghtoken
uses: actions/create-github-app-token@v2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💔 todo: We should use pinned versions here though I don't think the healthscore has released such a check yet...

📫 note: I can soon add these versions if needed!

with:
app-id: ${{ secrets.GH_APP_ID }}
owner: slackapi
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}

- name: Checkout code
uses: actions/checkout@v4

- name: Generate docs
run: |
slack docgen docs/reference

- name: Create a pull request
uses: peter-evans/create-pull-request@v7
with:
token: ${{ steps.ghtoken.outputs.token }}
title: "Automated Slack CLI reference docs for release"
body: "Automatically updating Slack CLI docs following release"
author: "slackapi[bot] <186980925+slackapi[bot]@users.noreply.github.com>"
committer: "slackapi[bot] <186980925+slackapi[bot]@users.noreply.github.com>"
commit-message: "Update slack cli reference docs"
base: "main"
branch: "update-slack-cli-reference"
delete-branch: true
labels: docs
Loading