From 78369bdb4eaa30427a51f028b91f224e583ef90e Mon Sep 17 00:00:00 2001 From: nathan Date: Wed, 20 Nov 2024 22:07:20 +0000 Subject: [PATCH] add ephemeral --- .github/workflows/ephemeral.yml | 8 ++++---- .github/workflows/staging-deployment.yml | 14 ++++++++++++++ 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ephemeral.yml b/.github/workflows/ephemeral.yml index 5819d9f..dd58795 100644 --- a/.github/workflows/ephemeral.yml +++ b/.github/workflows/ephemeral.yml @@ -1,9 +1,9 @@ -name: Mixed inputs +name: Deploy Ephemeral Staging on: workflow_dispatch: inputs: - name: + ttl: type: number description: TTL default: 8 @@ -15,6 +15,6 @@ jobs: steps: - name: Call Deployment Service run: | - curl -X POST https://staging-service.example.com/environments \ + curl -X POST https://new-forge-service/api/deploy \ -H "Authorization: Bearer ${{ secrets.STAGING_SERVICE_TOKEN }}" \ - -d '{"branch": "${{ github.ref_name }}"}' + -d '{"branch": "${{ github.ref_name }}", "ttl": ${{ github.event.inputs.ttl }}}}' diff --git a/.github/workflows/staging-deployment.yml b/.github/workflows/staging-deployment.yml index e69de29..62eeaab 100644 --- a/.github/workflows/staging-deployment.yml +++ b/.github/workflows/staging-deployment.yml @@ -0,0 +1,14 @@ +name: Deploy Ephemeral Staging + +on: ['pull_request'] + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - name: Call Deployment Service + run: | + curl -X POST https://new-forge-service/api/deploy \ + -H "Authorization: Bearer ${{ secrets.STAGING_SERVICE_TOKEN }}" \ + -d '{"branch": "${{ github.ref_name }}"}'