Skip to content

Commit 6012214

Browse files
Create environments-approvals.yml
1 parent 18d5fdd commit 6012214

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Multi-Environment Deployment
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
environment:
7+
description: "Choose environment"
8+
required: true
9+
default: "dev"
10+
11+
jobs:
12+
deploy:
13+
name: 🚀 Deploy Application
14+
runs-on: ubuntu-latest
15+
16+
environment:
17+
name: ${{ github.event.inputs.environment }}
18+
url: https://myapp-${{ github.event.inputs.environment }}.example.com
19+
20+
steps:
21+
- uses: actions/checkout@v4
22+
23+
- name: Print environment info
24+
run: |
25+
echo "Deploying to: ${{ github.event.inputs.environment }}"
26+
echo "Triggered by: ${{ github.actor }}"
27+
28+
- name: Use environment secret
29+
env:
30+
API_KEY: ${{ secrets.API_KEY }}
31+
run: echo "Using secret API key: ${API_KEY:0:4}****"
32+
33+
- name: Simulate deployment
34+
run: echo "Deploying app to ${{ github.event.inputs.environment }}..."

0 commit comments

Comments
 (0)