From 7f6cda1e20f4dfafdab3efba6831e78f6a36c971 Mon Sep 17 00:00:00 2001 From: Ben Walker Date: Wed, 27 Dec 2023 13:36:21 -0800 Subject: [PATCH] Rework action to obtain URL as artifact --- .github/workflows/test.yaml | 17 ++++++++-- .github/workflows/upload_deployment_url.yaml | 34 ++++++++++++++++++++ 2 files changed, 48 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/upload_deployment_url.yaml diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index a6c36448..3a247381 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -1,11 +1,17 @@ name: Playwright Tests + on: - deployment_status: + workflow_run: + workflows: ["Upload Deployment URL"] + types: + - completed + jobs: test: + needs: capture-deployment-url + if: github.event_name != 'deployment_status' timeout-minutes: 60 runs-on: ubuntu-latest - if: github.event.deployment_status.state == 'success' steps: - uses: actions/checkout@v4 with: @@ -13,6 +19,11 @@ jobs: - uses: actions/setup-node@v4 with: node-version: 18 + - name: Download Deployment URL + uses: actions/download-artifact@v2 + with: + name: deployment-url + - run: echo "$(> $GITHUB_ENV + - name: Save Deployment URL + uses: actions/upload-artifact@v4 + with: + name: deployment-url + path: $GITHUB_ENV \ No newline at end of file