Skip to content

Commit

Permalink
add ephemeral
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathan-Cowin committed Nov 20, 2024
1 parent 3418841 commit 78369bd
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ephemeral.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Mixed inputs
name: Deploy Ephemeral Staging

on:
workflow_dispatch:
inputs:
name:
ttl:
type: number
description: TTL
default: 8
Expand All @@ -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 }}}}'
14 changes: 14 additions & 0 deletions .github/workflows/staging-deployment.yml
Original file line number Diff line number Diff line change
@@ -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 }}"}'

0 comments on commit 78369bd

Please sign in to comment.