diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2025-08-06 23:39:33 +0300 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2025-08-06 23:39:33 +0300 |
commit | 79ab2972edd242c00d5acccfd02fbf519cb55d97 (patch) | |
tree | 4538c1d77c8a7885b12f7d8ea12a12fe4b0f45d4 /.github/workflows/irc.yml | |
parent | 162e47aebedb4138f5bad9640bc0e7ae954d8f44 (diff) | |
download | sciteco-79ab2972edd242c00d5acccfd02fbf519cb55d97.tar.gz |
irc.yml: retrieve the commit hash of the *previous* successful CI run
Diffstat (limited to '.github/workflows/irc.yml')
-rw-r--r-- | .github/workflows/irc.yml | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/.github/workflows/irc.yml b/.github/workflows/irc.yml index 7aba3f8..1d60fbc 100644 --- a/.github/workflows/irc.yml +++ b/.github/workflows/irc.yml @@ -15,20 +15,14 @@ jobs: steps: - name: Git Clone uses: actions/checkout@v4.1.6 - - name: Get last successful commit - uses: nrwl/last-successful-commit-action@v1 - id: last_successful_commit - with: - branch: 'master' - workflow_id: 'ci.yml' - github_token: ${{ secrets.GITHUB_TOKEN }} - name: Get log id: get_log run: | + # Get commit of the previous successful CI run + COMMIT="`gh run list --workflow="ci.yml" --limit=2 --status=success --json headSha -q '.[1].headSha'`" { echo 'LOG<<EOF' - git log --pretty="format:%h %s" --reverse \ - ${{ steps.last_successful_commit.outputs.commit_hash }}..HEAD + git log --pretty="format:%h %s" --reverse $COMMIT..HEAD echo EOF } >> "$GITHUB_OUTPUT" - name: Post IRC message |