diff --git a/.github/workflows/dispatch-ci.yml b/.github/workflows/dispatch-ci.yml new file mode 100644 index 0000000..845bfdd --- /dev/null +++ b/.github/workflows/dispatch-ci.yml @@ -0,0 +1,36 @@ +# ============================================================================= +# FILE: .github/workflows/dispatch-ci.yml +# REPO: localstack-samples/localstack-azure-samples (FREE org) +# +# Purpose: On every PR or manual trigger, dispatch a CI run to the paid org +# where advanced runners are available. +# ============================================================================= +name: Dispatch CI + +on: + pull_request: + branches: [main] + push: + branches: [main] + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +jobs: + dispatch: + runs-on: ubuntu-latest + steps: + - name: Trigger CI in paid org + run: | + gh workflow run run-samples.yml \ + --repo localstack/azure-samples-ci \ + --ref main \ + --field sha="${{ github.event.pull_request.head.sha || github.sha }}" \ + --field ref="${{ github.head_ref || github.ref_name }}" \ + --field pr_number="${{ github.event.pull_request.number || '' }}" \ + --field repo="${{ github.repository }}" \ + --field run_url="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" + env: + GH_TOKEN: ${{ secrets.PAID_ORG_PAT }}