File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 62
62
63
63
- name : Comment on PR
64
64
uses : actions/github-script@v7
65
+ env :
66
+ VERSION : ${{ env.VERSION }}
65
67
with :
66
68
script : |
67
69
const version = process.env.VERSION;
70
+ const prNumber = context.payload.pull_request.number;
68
71
const comment = `
69
72
🚀 Preview package published!
70
73
@@ -73,15 +76,16 @@ jobs:
73
76
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple socketsecurity==${version}
74
77
\`\`\`
75
78
76
- Docker image: \`socketdev/cli:pr-${context.issue.number }\`
79
+ Docker image: \`socketdev/cli:pr-${prNumber }\`
77
80
`;
78
81
79
82
github.rest.issues.createComment({
80
- issue_number: context.issue.number ,
83
+ issue_number: prNumber ,
81
84
owner: context.repo.owner,
82
85
repo: context.repo.name,
83
86
body: comment
84
- })
87
+ });
88
+
85
89
86
90
- name : Login to Docker Hub
87
91
uses : docker/login-action@v3
91
95
92
96
- name : Build & Push Docker Preview
93
97
uses : docker/build-push-action@v5
98
+ env :
99
+ VERSION : ${{ env.VERSION }}
94
100
with :
95
101
push : true
96
102
tags : socketdev/cli:pr-${{ github.event.pull_request.number }}
You can’t perform that action at this time.
0 commit comments