File tree Expand file tree Collapse file tree 1 file changed +51
-0
lines changed Expand file tree Collapse file tree 1 file changed +51
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Deploy to QA or Demo environment manually
2+
3+ on :
4+ workflow_dispatch :
5+ inputs :
6+ environment :
7+ type : choice
8+ description : ' Choose environment to deploy'
9+ required : true
10+ default : ' qa'
11+ options :
12+ - qa
13+ - demo
14+
15+ env :
16+ REGISTRY : ghcr.io
17+
18+ jobs :
19+ # set_environment:
20+ # - name: Set environment output from git
21+ # id: env_var
22+ # run: |
23+ # if [ "${{ github.event.inputs.environment }}" = "qa" ]; then
24+ # echo "env_name=dev" >> $GITHUB_OUTPUT
25+ # else
26+ # echo "env_name=demo" >> $GITHUB_OUTPUT
27+ # fi
28+
29+ deploy :
30+ # needs: set_environment
31+
32+ runs-on : ${{ github.event.inputs.environment }}
33+
34+ steps :
35+ - name : Hello
36+ run : echo "Hello from ${{ github.event.inputs.environment }} env!"
37+ # - name: Checkout Repo
38+ # uses: actions/checkout@v3
39+
40+ # - name: Deploy
41+ # working-directory: ./dev
42+ # env:
43+ # TAG_LATEST: ${{ needs.build.outputs.tag_latest }}
44+ # REGISTRY_PATH: ${{ needs.build.outputs.registry_path }}
45+ # run: |
46+ # sed -i "s|registry=|registry=${REGISTRY_PATH}|g" .env
47+ # sed -i "s/latest/${TAG_LATEST}/g" .env
48+ # sudo docker-compose stop
49+ # sudo docker system prune -a -f
50+ # sudo docker-compose pull
51+ # HOSTNAME=$HOSTNAME sudo docker-compose -f docker-compose.yml -f docker-compose.env.yml up -d
You can’t perform that action at this time.
0 commit comments