File tree Expand file tree Collapse file tree 3 files changed +56
-4
lines changed Expand file tree Collapse file tree 3 files changed +56
-4
lines changed Original file line number Diff line number Diff line change 5
5
inputs :
6
6
environment :
7
7
type : string
8
- commit :
8
+ docker_tag :
9
9
type : string
10
10
11
11
workflow_dispatch :
12
12
inputs :
13
13
environment :
14
14
type : environment
15
- commit :
15
+ docker_tag :
16
16
type : string
17
17
jobs :
18
18
19
19
wait :
20
20
21
21
name : Wait for deployment to `${{ inputs.environment }}`
22
22
runs-on : ubuntu-latest
23
- environment : ${{ inputs.environment }}
24
23
25
24
steps :
26
- - run : echo "Check is `${{ inputs.commit }}` is deployd to `${{ inputs.environment }}`"
25
+ - run : echo "Check is `${{ inputs.docker_tag }}` is deployd to `${{ inputs.environment }}`"
Original file line number Diff line number Diff line change
1
+ name : Deploy
2
+
3
+ on :
4
+ workflow_call :
5
+ inputs :
6
+ environment :
7
+ type : string
8
+ output :
9
+ docker_tag :
10
+ description : " Docker tag"
11
+ value : ${{ jobs.deploy.outputs.tag }}
12
+
13
+ jobs :
14
+
15
+ deploy :
16
+
17
+ name : Deploy to `${{ inputs.environment }}`
18
+ runs-on : ubuntu-latest
19
+ environment : ${{ inputs.environment }}
20
+ outputs :
21
+ tag : ${{ steps.docker.outputs.tag_name }}
22
+
23
+ steps :
24
+ - run : echo "Deploy to `${{ inputs.environment }}`"
25
+
26
+ - name : Create output
27
+ id : docker
28
+ run : |
29
+ run: echo "tag_name=latest" >> "$GITHUB_OUTPUT"
Original file line number Diff line number Diff line change
1
+ name : Deploy and wait
2
+
3
+ on :
4
+ # label: # uncomment push
5
+ push :
6
+ branches :
7
+ - main
8
+
9
+ jobs :
10
+
11
+ deploy :
12
+ name : Deploy
13
+ uses : ./.github/workflows/09_Deploy.yaml
14
+ with :
15
+ environment : test
16
+
17
+ wait :
18
+ name : Wait
19
+ needs :
20
+ - deploy
21
+ uses : ./.github/workflows/08_Wait-for-deployment.yaml
22
+ with :
23
+ environment : test
24
+ docker_tag : ${{ needs.deploy.outputs.docker_tag }}
You can’t perform that action at this time.
0 commit comments