Skip to content

Commit

Permalink
Automatically trigger wasm publish
Browse files Browse the repository at this point in the history
  • Loading branch information
Hinton committed Oct 31, 2024
1 parent 63e7c51 commit 7053b36
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/build-wasm-internal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,33 @@ jobs:
name: sdk-internal
path: ${{ github.workspace }}/languages/js/sdk-internal/*
if-no-files-found: error

trigger-wasm-publish:
name: Trigger WASM publish
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-22.04
needs: build
steps:
- name: Login to Azure - CI Subscription
uses: Azure/login@e15b166166a8746d1a47596803bd8c1b595455cf # v1.6.0
with:
creds: ${{ secrets.AZURE_KV_CI_SERVICE_PRINCIPAL }}

- name: Retrieve github PAT secrets
id: retrieve-secret-pat
uses: bitwarden/gh-actions/get-keyvault-secrets@main
with:
keyvault: "bitwarden-ci"
secrets: "github-pat-bitwarden-devops-bot-repo-scope"

- name: Trigger WASM publish
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
github-token: ${{ steps.retrieve-secret-pat.outputs.github-pat-bitwarden-devops-bot-repo-scope }}
script: |
await github.rest.actions.createWorkflowDispatch({
owner: 'bitwarden',
repo: 'sdk-internal',
workflow_id: 'publish-wasm-internal.yml',
ref: 'main',
})
File renamed without changes.

0 comments on commit 7053b36

Please sign in to comment.