File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44 workflow_dispatch :
55 inputs :
66 environment :
7- description : " Choose environment"
7+ description : " Choose environment to deploy "
88 required : true
99 default : " dev"
1010
1111jobs :
1212 deploy :
1313 name : 🚀 Deploy Application
1414 runs-on : ubuntu-latest
15-
1615 environment :
1716 name : ${{ github.event.inputs.environment }}
1817 url : https://myapp-${{ github.event.inputs.environment }}.example.com
1918
2019 steps :
21- - uses : actions/checkout@v4
20+ - name : Checkout code
21+ uses : actions/checkout@v4
2222
2323 - name : Print environment info
2424 run : |
25- echo "Deploying to: ${{ github.event.inputs.environment }}"
25+ echo "Deploying to environment : ${{ github.event.inputs.environment }}"
2626 echo "Triggered by: ${{ github.actor }}"
2727
2828 - name : Use environment secret
2929 env :
3030 API_KEY : ${{ secrets.API_KEY }}
31- run : echo "Using secret API key: ${API_KEY:0:4}****"
31+ run : |
32+ echo "Using secret (masked): ${API_KEY:0:4}****"
33+ echo "Environment URL: https://myapp-${{ github.event.inputs.environment }}.example.com"
3234
3335 - name : Simulate deployment
34- run : echo "Deploying app to ${{ github.event.inputs.environment }}..."
36+ run : |
37+ echo "🚀 Deploying app to ${{ github.event.inputs.environment }}..."
38+ sleep 3
39+ echo "✅ Deployment successful!"
You can’t perform that action at this time.
0 commit comments