From 66c2806666f8e2b4b6b10217945f7294236c336a Mon Sep 17 00:00:00 2001 From: ckoegel Date: Fri, 14 Mar 2025 17:02:53 -0400 Subject: [PATCH] SWI-7344 Add Code Snippets Workflow --- .github/workflows/update-code-snippets.yml | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/update-code-snippets.yml diff --git a/.github/workflows/update-code-snippets.yml b/.github/workflows/update-code-snippets.yml new file mode 100644 index 00000000..362de799 --- /dev/null +++ b/.github/workflows/update-code-snippets.yml @@ -0,0 +1,28 @@ +name: Update Code Snippets + +on: + push: + branches: + - main + workflow_dispatch: + +jobs: + update_code_snippets: + name: Repository Dispatch to Update Code Snippets + runs-on: ${{ fromJSON(vars.SWI_GLORG_UBUNTU_2204) }} + permissions: + id-token: write + contents: read + steps: + - name: Get Github Token from Vault + uses: Bandwidth/vault-provider-action@v1 + with: + export-github-pat: true + + - name: Send Repository Dispatch Event + uses: Bandwidth/repository-dispatch-action@v2.0.0 + with: + token: ${{ env.GITHUB_ACCESS_TOKEN }} + repository: api-specs + event-type: SnippetsUpdate + client-payload: '{"language": "python"}'