24
24
WORKSPACE : ${{ inputs.workspace }}
25
25
CACHE_NAME : ${{ inputs.workspace }}-${{ inputs.account }}-${{ inputs.scope }}
26
26
SCOPE : ${{ inputs.scope }}
27
- # SLACK_WEBHOOK_URL: ${{ secrets.DEPLOY_ENV_SLACK_HOOK_URL }}
28
27
CI_ROLE_NAME : ${{ secrets.CI_ROLE_NAME }}
29
28
30
29
jobs :
74
73
needs : [get-branch-from-workflow-file, build]
75
74
runs-on : [self-hosted, ci]
76
75
steps :
77
- - uses : actions/checkout@v4
78
- with :
79
- ref : ${{ needs.get-branch-from-workflow-file.outputs.branch_name }}
80
76
- uses : ./.github/actions/terraform/
81
77
with :
82
78
command : init
91
87
needs : [get-branch-from-workflow-file, terraform--init]
92
88
runs-on : [self-hosted, ci]
93
89
steps :
94
- - uses : actions/checkout@v4
95
- with :
96
- ref : ${{ needs.get-branch-from-workflow-file.outputs.branch_name }}
97
90
- uses : ./.github/actions/terraform/
98
91
with :
99
92
command : plan
@@ -109,9 +102,6 @@ jobs:
109
102
environment : ${{ inputs.account }}
110
103
runs-on : [self-hosted, ci]
111
104
steps :
112
- - uses : actions/checkout@v4
113
- with :
114
- ref : ${{ needs.get-branch-from-workflow-file.outputs.branch_name }}
115
105
- uses : ./.github/actions/terraform/
116
106
with :
117
107
command : apply
@@ -126,9 +116,6 @@ jobs:
126
116
needs : [get-branch-from-workflow-file, terraform--apply]
127
117
runs-on : [self-hosted, ci]
128
118
steps :
129
- - uses : actions/checkout@v4
130
- with :
131
- ref : ${{ needs.get-branch-from-workflow-file.outputs.branch_name }}
132
119
- uses : ./.github/actions/make/
133
120
if : ${{ env.SCOPE == 'per_workspace'}}
134
121
with :
@@ -150,9 +137,6 @@ jobs:
150
137
needs : [get-branch-from-workflow-file, apigee--deploy]
151
138
runs-on : [self-hosted, ci]
152
139
steps :
153
- - uses : actions/checkout@v4
154
- with :
155
- ref : ${{ needs.get-branch-from-workflow-file.outputs.branch_name }}
156
140
- uses : ./.github/actions/make/
157
141
with :
158
142
command : test--smoke WORKSPACE="${{ env.WORKSPACE }}" ACCOUNT="${{ env.ACCOUNT }}"
@@ -177,16 +161,24 @@ jobs:
177
161
runs-on : [self-hosted, ci]
178
162
179
163
steps :
164
+ - name : Catch failed steps
165
+ id : catch-failed-step
166
+ uses : ./.github/actions/catch-failed-step
180
167
- name : Send job result to slack
181
168
id : slack
182
169
183
170
with :
184
171
payload : |
185
172
{
173
+ "action_url": "${{ format('{0}/{1}/actions/runs/{2}/attempts/{3}', github.server_url, github.repository, github.run_id, github.run_attempt) }}",
174
+ "attempt": ${{ github.run_attempt }},
186
175
"account": "${{ env.ACCOUNT }}",
187
- "environment": "${{ env.WORKSPACE }}",
188
- "result": "${{ needs.set-success.outputs.success && needs.set-success.outputs.success || 'failed' }}",
189
- "branch": "${{ needs.get-branch-from-workflow-file.outputs.branch_name }}"
176
+ "workspace": "${{ env.WORKSPACE }}",
177
+ "caller": "${{ github.triggering_actor }}",
178
+ "scope": "${{ env.SCOPE }}",
179
+ "branch": "${{ needs.get-branch-from-workflow-file.outputs.branch_name }}",
180
+ "result": "${{ needs.set-success.outputs.success && needs.set-success.outputs.success || 'failed' }}",
181
+ "result_detail": "${{ needs.set-success.outputs.success && 'None' || steps.catch-failed-step.outputs.failed-step-name }}"
190
182
}
191
183
env :
192
184
SLACK_WEBHOOK_URL : ${{ secrets.DEPLOY_ENV_SLACK_HOOK_URL }}
0 commit comments