Skip to content

Merge branch 'main' into sbom-draft #254

Merge branch 'main' into sbom-draft

Merge branch 'main' into sbom-draft #254

Workflow file for this run

name: "Notify to IRC"
on:
push:
pull_request:
types: [opened, reopened, closed]
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 20
env:
server: ssl.irc.perl.org
port: 7062
channel: "#cpan-security"
color_green: "\x0303"
color_orange: "\x0307"
color_pink: "\x0313"
color_clear: "\x0F"
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- name: Setup branch env name
env:
github_ref: ${{ github.event.ref }}
run: |
ref="${github_ref/refs\/heads\//}"
echo "ref=$ref" >> $GITHUB_ENV
- name: IRC message on push
uses: rectalogic/notify-irc@v2
if: github.event_name == 'push'
with:
channel: ${{ env.channel }}
server: ${{ env.server }}
port: ${{ env.port }}
nickname: cpansec-push
message: |-
${{ env.color_orange }}${{ github.actor }}${{ env.color_clear }} pushed to ${{ env.color_green }}${{ env.ref }}${{ env.color_clear }} branch on ${{ github.repository }}
${{ join(github.event.commits.*.message) }}
- name: IRC message on open pull request
uses: rectalogic/notify-irc@v2
if: github.event_name == 'pull_request' && github.event.action == 'opened'
with:
channel: ${{ env.channel }}
server: ${{ env.server }}
port: ${{ env.port }}
nickname: cpansec-pr-open
message: |-
${{ env.color_orange }}${{ github.actor }}${{ env.color_clear }} opened PR #${{ github.event.pull_request.number }}
${{ github.event.pull_request.html_url }}
- name: IRC message on merged pull request
uses: rectalogic/notify-irc@v2
if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true
with:
server: ${{ env.server }}
port: ${{ env.port }}
channel: ${{ env.channel }}
nickname: cpansec-pr-merge
message: |-
${{ env.color_orange }}${{ github.actor }}${{ env.color_clear }} merged PR #${{ github.event.pull_request.number }}
${{ github.event.pull_request.html_url }}
- name: IRC message on closed pull request
uses: rectalogic/notify-irc@v2
if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == false
with:
server: ${{ env.server }}
port: ${{ env.port }}
channel: ${{ env.channel }}
nickname: cpansec-pr-close
message: |-
${{ env.color_orange }}${{ github.actor }}${{ env.color_clear }} closed PR #${{ github.event.pull_request.number }}
${{ github.event.pull_request.html_url }}
- name: IRC message on tag created
uses: rectalogic/notify-irc@v2
if: github.event_name == 'create' && github.event.ref_type == 'tag'
with:
server: ${{ env.server }}
port: ${{ env.port }}
channel: ${{ env.channel }}
nickname: cpansec-new-tag
message: |-
${{ env.color_orange }}${{ github.actor }}${{ env.color_clear }} tagged ${{ github.repository }} ${{ github.event.ref }}