Skip to content

Commit

Permalink
fix(ci): use workflow-dispatch action to trigger next branch workfl…
Browse files Browse the repository at this point in the history
…ow (#6977)
  • Loading branch information
lucasfernog committed May 16, 2023
1 parent 994e4fd commit 2344aea
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 13 deletions.
13 changes: 5 additions & 8 deletions .github/workflows/covector-version-or-publish-next.yml
Expand Up @@ -72,20 +72,17 @@ jobs:
if: |
steps.covector.outputs.successfulPublish == 'true' &&
contains(steps.covector.outputs.packagesPublished, 'cli.rs')
uses: peter-evans/repository-dispatch@v1
uses: benc-uk/workflow-dispatch@v1
with:
token: ${{ secrets.ORG_TAURI_BOT_PAT }}
repository: tauri-apps/tauri
event-type: publish-clijs
client-payload: '{"releaseId": "${{ steps.covector.outputs.cli.js-releaseId }}", "ref": "${{ github.ref }}" }'
workflow: publish-cli-js.yml
inputs: '{"releaseId": "${{ steps.covector.outputs.cli.js-releaseId }}", "ref": "${{ github.ref }}" }'

- name: Trigger cli.rs publishing workflow
if: |
steps.covector.outputs.successfulPublish == 'true' &&
contains(steps.covector.outputs.packagesPublished, 'cli.rs')
uses: peter-evans/repository-dispatch@v1
uses: benc-uk/workflow-dispatch@v1
with:
token: ${{ secrets.ORG_TAURI_BOT_PAT }}
repository: tauri-apps/tauri
event-type: publish-clirs
client-payload: '{"ref": "${{ github.ref }}" }'
workflow: publish-cli-rs.yml
4 changes: 1 addition & 3 deletions .github/workflows/publish-cli-js.yml
Expand Up @@ -92,8 +92,6 @@ jobs:
runs-on: ${{ matrix.settings.host }}
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.client_payload.ref || '' }}
- name: Setup node
uses: actions/setup-node@v3
if: ${{ !matrix.settings.docker }}
Expand Down Expand Up @@ -403,4 +401,4 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.ORG_NPM_TOKEN }}
RELEASE_ID: ${{ github.event.client_payload.releaseId || github.event.inputs.releaseId }}
RELEASE_ID: ${{ github.event.client_payload.releaseId || inputs.releaseId }}
2 changes: 0 additions & 2 deletions .github/workflows/publish-cli-rs.yml
Expand Up @@ -33,8 +33,6 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.client_payload.ref || '' }}

- name: 'Setup Rust'
uses: dtolnay/rust-toolchain@stable
Expand Down

0 comments on commit 2344aea

Please sign in to comment.