19
19
steps :
20
20
- uses : actions/checkout@v2
21
21
- uses : abatilo/actions-poetry@v2.1.4
22
+ - run : poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
22
23
- with :
23
24
project_id : ${{ secrets.IAM_GCR_REPO }}
24
25
service_account_key : ${{ env.GCLOUD_TOKEN }}
@@ -27,14 +28,17 @@ jobs:
27
28
28
29
- run : |
29
30
echo "::set-output name=version::$(poetry version -s)"
30
- echo "::set-output name=short-sha::${${{ github.sha }} :0:10}"
31
+ echo "::set-output name=short-sha::${GITHUB_SHA :0:10}"
31
32
id: configure
32
33
33
34
- uses : UWIT-IAM/actions/set-up-slack-notification-canvas@0.1.8
35
+ id : create-canvas
36
+ env :
37
+ description_prefix : ${{ env.dry_run && '[DRY RUN] ' || '' }}
34
38
with :
35
39
json : >
36
40
{
37
- "description": "${{ github.workflow }}",
41
+ "description": "${{ env.description_prefix }}${{ github.workflow }}",
38
42
"status": "in progress",
39
43
"channel": "#iam-bots",
40
44
"steps": [
55
59
]
56
60
}
57
61
58
- - uses : UWIT-IAM/actions/update-slack-workflow-canvas@main
62
+ - uses : UWIT-IAM/actions/update-slack-workflow-canvas@0.1.8
63
+ if : steps.create-canvas.outputs.canvas-id
59
64
env :
60
65
commit_url : >
61
66
https://github.com/${{ github.repository }}/commit/${{ github.sha }}
69
74
- run : ./scripts/pre-push.sh --check-only
70
75
id : run-tests
71
76
72
- - if : always()
73
- uses : UWIT-IAM/actions/update-slack-workflow-canvas@main
77
+ - if : always() && steps.create-canvas.outputs.canvas-id
78
+ uses : UWIT-IAM/actions/update-slack-workflow-canvas@0.1.8
74
79
env :
75
80
test-status : ${{ steps.run-tests.outcome == 'success' && 'succeeded' || 'failed' }}
76
81
release-status : ${{ steps.run-tests.outcome == 'success' && 'in progress' || 'not started' }}
87
92
commit : ${{ github.sha }}
88
93
tag : ${{ steps.configure.outputs.version }}
89
94
90
- - uses : UWIT-IAM/actions/update-slack-workflow-canvas@main
95
+ - uses : UWIT-IAM/actions/update-slack-workflow-canvas@0.1.8
96
+ if : success() && steps.create-canvas.outputs.canvas-id
91
97
env :
92
98
release_version : ${{ steps.configure.outputs.version }}
93
99
release_url : ${{ steps.create-release.outputs.html_url || 'https://www.example.com' }}
@@ -97,14 +103,14 @@ jobs:
97
103
description : >
98
104
${{ env.action_desc }} release
99
105
<${{ env.release_url }} | ${{ env.release_version }}>
100
-
101
106
- run : |
107
+ set -x
102
108
poetry publish \
103
109
--build \
104
110
$(test "${{ env.dry_run }}" == "false" || echo "--dry-run")
105
111
id: publish-release
106
112
107
- - if : always()
113
+ - if : always() && steps.create-canvas.outputs.canvas-id
108
114
uses : UWIT-IAM/actions/finalize-slack-notification-canvas@0.1.8
109
115
with :
110
116
workflow-status : ${{ job.status == 'failure' && 'failed' || 'succeeded' }}
0 commit comments