Skip to content

Commit

Permalink
Github Actions - Link Artifacts in PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
nerdCopter committed Feb 21, 2024
1 parent 1c6b5fe commit 7843022
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ jobs:
echo "outputs.buildtag: ${{ steps.ids.outputs.buildtag }}"
echo "outputs.shortsha: ${{ steps.ids.outputs.shortsha }}"
echo "outputs.artfact: ${{ steps.ids.outputs.artifact }}"
echo "outputs.artfact: ${{ steps.ids.outputs.artifact }}"
echo "outputs.version: ${{ steps.ids.outputs.version }}"
continue-on-error: true

# Build HEX
Expand All @@ -148,12 +148,12 @@ jobs:
# for debugging
- name: Show Variables
run: |
echo "Artifact name: ${{ env.ARTIFACT_NAME }}"
echo "Artifact name: ${{ needs.build.outputs.artifact }}"
- name: download artifacts
uses: actions/download-artifact@v2
with:
name: ${{ env.ARTIFACT_NAME }}
name: ${{ needs.build.outputs.artifact }}
continue-on-error: false

# Hide existing/outdated artifacts links
Expand All @@ -172,7 +172,7 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
let fs = require('fs');
let issue_number = Number(fs.readFileSync("./${{ env.ARTIFACT_NAME }}"));
let issue_number = Number(fs.readFileSync("./${{ needs.build.outputs.artifact }}"));
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
Expand Down Expand Up @@ -201,7 +201,7 @@ jobs:
echo "outputs.buildtag: ${{ needs.build.outputs.buildtag }}"
echo "outputs.shortsha: ${{ needs.build.outputs.shortsha }}"
echo "outputs.artfact: ${{ needs.build.outputs.artifact }}"
echo "outputs.artfact: ${{ needs.build.outputs.version }}"
echo "outputs.version: ${{ needs.build.outputs.version }}"
echo "NOW=$(date +'%Y%m%d.%H%M%S')" >> $GITHUB_ENV
continue-on-error: true

Expand Down

0 comments on commit 7843022

Please sign in to comment.