feat(sts): accept AssumeRoleWithWebIdentity params from form-encoded POST bodies #338
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Preview | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened, closed] | |
| # Skip the worker preview when a PR only touches docs (see docs-preview.yml). | |
| # The worker still deploys whenever any non-docs file changes. | |
| paths-ignore: | |
| - "docs/**" | |
| concurrency: | |
| group: preview-${{ github.event.pull_request.number }} | |
| cancel-in-progress: true | |
| jobs: | |
| deploy: | |
| name: Deploy & Test | |
| if: github.event.action != 'closed' | |
| uses: ./.github/workflows/deploy.yml | |
| with: | |
| worker_name: multistore-proxy-pr-${{ github.event.pull_request.number }} | |
| wrangler_config: wrangler.deploy.toml | |
| environment: preview | |
| # Run the real-S3 multipart write smoke test on every preview. | |
| smoke_write_bucket: smoke-writable | |
| # Mint tokens with the STABLE staging issuer rather than this PR's own URL. | |
| # All deployments share OIDC_PROVIDER_KEY, so a preview can sign assertions | |
| # whose `iss` is the staging URL; AWS then validates them against the | |
| # single, already-registered staging IAM OIDC provider. This lets the full | |
| # federation path (tests/smoke/test_federation.py) run on every PR | |
| # WITHOUT creating/tearing down a per-PR identity provider + role. | |
| oidc_issuer_override: ${{ vars.STAGING_OIDC_ISSUER }} | |
| secrets: | |
| CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
| SESSION_TOKEN_KEY: ${{ secrets.SESSION_TOKEN_KEY }} | |
| OIDC_PROVIDER_KEY: ${{ secrets.OIDC_PROVIDER_KEY }} | |
| comment: | |
| name: PR Comment | |
| needs: deploy | |
| if: github.event.action != 'closed' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pull-requests: write | |
| steps: | |
| - name: Find Comment | |
| uses: peter-evans/find-comment@b30e6a3c0ed37e7c023ccd3f1db5c6c0b0c23aad # v4 | |
| id: find-comment | |
| with: | |
| issue-number: ${{ github.event.pull_request.number }} | |
| comment-author: "github-actions[bot]" | |
| body-includes: Latest commit deployed to | |
| - name: Create or update comment | |
| uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5 | |
| with: | |
| comment-id: ${{ steps.find-comment.outputs.comment-id }} | |
| issue-number: ${{ github.event.pull_request.number }} | |
| body: | | |
| 🚀 Latest commit deployed to ${{ needs.deploy.outputs.deploy_url }} | |
| * Date: `${{ github.event.pull_request.updated_at }}` | |
| * Commit: ${{ github.sha }} | |
| edit-mode: replace | |
| cleanup: | |
| name: Cleanup Preview | |
| if: github.event.action == 'closed' | |
| runs-on: ubuntu-latest | |
| env: | |
| CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
| steps: | |
| - name: Delete preview worker | |
| run: npx wrangler delete --name "multistore-proxy-pr-${{ github.event.pull_request.number }}" --force |