Just print the commit subject line

This commit is contained in:
Gunter Labes 2023-08-23 14:51:43 +02:00 committed by GitHub
parent 8e7f5c03af
commit b4af64a87c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -323,17 +323,17 @@ jobs:
pusher: ${{ github.actor }}
commit: ${{ github.event.head_commit.message }}
commit url: ${{ github.event.head_commit.url }}
- name: Prepare message
if: github.event_name == 'push'
env:
MSG: ${{ github.event.head_commit.message }}
run: |
printf COMMIT_SUBJECT=%s "${MSG}" | head -n 1 >> "$GITHUB_ENV"
- name: IRC Notification
uses: rectalogic/notify-irc@v1
env:
COLOR: ${{ fromJSON('"\u0003"') }}
BLUE: 02
PURPLE: 06
SILVER: 15
with:
channel: ${{ vars.IRC_CHANNEL }}
server: ${{ vars.IRC_SERVER }}
nickname: ${{ vars.IRC_NICK }} # is also used for sasl username
sasl_password: ${{ secrets.IRC_SASL_PASSWORD }}
message: >-
${{ format('❌ CI workflow run failed on {0}{1}{2}{0}: {3} by {0}{4}{5}{0}: {0}{6}{7}{0}', env.COLOR, env.PURPLE, github.ref_name, github.event.head_commit.message, env.SILVER, github.actor, env.BLUE, github.event.head_commit.url) }}
message: "❌ ${{ github.workflow }} workflow run ${{ github.run_number }} failed on \x0306${{ github.ref_name }}\x0F: ${{ env.COMMIT_SUBJECT }} by \x0315${{ github.actor }}\x0F: \x0302${{ github.event.head_commit.url }}\x0F"