diff --git a/.github/workflows/lint_test.yml b/.github/workflows/lint_test.yml index 0e423af8..64d6823e 100644 --- a/.github/workflows/lint_test.yml +++ b/.github/workflows/lint_test.yml @@ -235,7 +235,7 @@ jobs: - name: Upload a Build Artifact if: always() && steps.prepare-artifact.outcome == 'success' continue-on-error: true - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: pull-request-payload path: pull_request_payload.json diff --git a/.github/workflows/status_embed.yml b/.github/workflows/status_embed.yml index 6c871f0f..5a2a396c 100644 --- a/.github/workflows/status_embed.yml +++ b/.github/workflows/status_embed.yml @@ -11,8 +11,9 @@ on: jobs: status_embed: - name: Send Status Embed to Discord + name: Send Status Embed to Discord runs-on: ubuntu-latest + if: ${{ !endsWith(github.actor, '[bot]') }} steps: # Process the artifact uploaded in the `pull_request`-triggered workflow: @@ -23,13 +24,13 @@ jobs: curl -s -H "Authorization: token $GITHUB_TOKEN" ${{ github.event.workflow_run.artifacts_url }} > artifacts.json DOWNLOAD_URL=$(cat artifacts.json | jq -r '.artifacts[] | select(.name == "pull-request-payload") | .archive_download_url') [ -z "$DOWNLOAD_URL" ] && exit 1 - wget --quiet --header="Authorization: token $GITHUB_TOKEN" -O pull_request_payload.zip $DOWNLOAD_URL || exit 2 + curl -sSL -H "Authorization: token $GITHUB_TOKEN" -o pull_request_payload.zip $DOWNLOAD_URL || exit 2 unzip -p pull_request_payload.zip > pull_request_payload.json [ -s pull_request_payload.json ] || exit 3 - echo "::set-output name=pr_author_login::$(jq -r '.user.login // empty' pull_request_payload.json)" - echo "::set-output name=pr_number::$(jq -r '.number // empty' pull_request_payload.json)" - echo "::set-output name=pr_title::$(jq -r '.title // empty' pull_request_payload.json)" - echo "::set-output name=pr_source::$(jq -r '.head.label // empty' pull_request_payload.json)" + echo "pr_author_login=$(jq -r '.user.login // empty' pull_request_payload.json)" >> $GITHUB_OUTPUT + echo "pr_number=$(jq -r '.number // empty' pull_request_payload.json)" >> $GITHUB_OUTPUT + echo "pr_title=$(jq -r '.title // empty' pull_request_payload.json)" >> $GITHUB_OUTPUT + echo "pr_source=$(jq -r '.head.label // empty' pull_request_payload.json)" >> $GITHUB_OUTPUT env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}