Skip to content

Commit

Permalink
Fix usage of deprecated set-output, give nicer URL to commit (#916)
Browse files Browse the repository at this point in the history
`set-output` is deprecated
(https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/)
and the job always printed annoying warning because of that. Fix that to
use `$GITHUB_OUTPUT` instead.

Additionally, instead of printing just a hash of the commit, print a
(clickable) URL to the commit.
  • Loading branch information
avelanarius authored Oct 24, 2024
1 parent 0461d8e commit f1dcf02
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ jobs:

- name: Get last commit author
id: get_author
run: echo "::set-output name=author::$(git log -1 --pretty=format:'%an <%ae> sha1={%H}')"
run: >
echo "author=$(git log -1 --pretty=format:'%an <%ae>, commit URL: ${{ github.server_url }}/${{ github.repository }}/commit/%H')" >> $GITHUB_OUTPUT
- name: License Header Verification
working-directory: ci/it
Expand Down

0 comments on commit f1dcf02

Please sign in to comment.