Skip to content

Commit 6ca2a12

Browse files
committed
fix? worflow comment artifact link
1 parent f6d823e commit 6ca2a12

1 file changed

Lines changed: 8 additions & 11 deletions

File tree

.github/workflows/pr.yml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Send artifact
1+
name: Pull request
22

33
on:
44
pull_request:
@@ -10,23 +10,20 @@ jobs:
1010
comment-tarball:
1111
runs-on: ubuntu-latest
1212
needs: ci
13-
steps:
14-
- name: Get tarball link
15-
id: tarball-link
16-
run: |
17-
echo ::set-output name=url::$(curl --header "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
18-
--header "Accept: application/vnd.github.v3+json" \
19-
"https://api.github.com/repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts" | \
20-
jq -r '.artifacts[0].archive_download_url')
21-
13+
steps:
2214
- name: Send tarball link
2315
uses: actions/github-script@v4
2416
with:
2517
github-token: ${{ secrets.GITHUB_TOKEN }}
2618
script: |
27-
const tarballLink = steps.tarball-link.outputs.url;
19+
const tarballLink = $(curl --header "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
20+
--header "Accept: application/vnd.github.v3+json" \
21+
"https://api.github.com/repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts" | \
22+
jq -r '.artifacts[0].archive_download_url')
23+
2824
const downloadMsg = `The tarball is available for download [here](${tarballLink}).`
2925
const installMsg = 'To install it, execute \`sudo tar -C / --no-same-owner -h -xzf linux-enable-ir-emitter.tar.gz\`.'
26+
3027
github.issues.createComment({
3128
issue_number: context.issue.number,
3229
owner: context.repo.owner,

0 commit comments

Comments
 (0)