-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (37 loc) · 1.99 KB
/
branch-builder.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: Branch Builder
on:
pull_request:
types: [opened, reopened, synchronize]
push:
branches: [ main ]
tags-ignore: "**"
workflow_dispatch:
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }} # github.head_ref for pull_request event and github.ref_name for push event
SLACK_BOT_TOKEN: ${{ secrets.SLACK_TEST_TOKEN }}
SLACK_CHANNEL_ID: ${{ secrets.SLACK_TEST_CHANNEL_ID }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Test Slack message with default settings
id: basic-message
uses: ./
with:
channel: ${{ env.SLACK_CHANNEL_ID }}
text: 'Test message from <https://github.com/${{ github.repository }}|`${{ github.repository }}`>:\n\nMessage sent from: <https://github.com/${{ github.repository }}/compare/main...${{ env.BRANCH_NAME }}|`${{ env.BRANCH_NAME }}`>\nWorkflow Log: <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|Run ${{ github.run_id }}>'
- name: Test Slack message with optional inputs specified (reply message + unfurl_links disabled)
uses: ./
with:
channel: ${{ env.SLACK_CHANNEL_ID }}
thread_ts: ${{ steps.basic-message.outputs.ts }}
text: 'Test reply with a link to unfurl (that should _not_ unfurl): <https://aus.youneedabudget.com/|YNAB AU Marketing Site>'
unfurl_links: false
- name: Test Slack message with various text formatting
uses: ./
with:
channel: ${{ env.SLACK_CHANNEL_ID }}
thread_ts: ${{ steps.basic-message.outputs.ts }}
text: "Test various text formatting:\n• Single quotes must be escaped \\' (b/c bash)\n• literal emoji 😀\n• colon-formatted emoji :blob-wave:\n• *bold text*\n• _italicized text_\n• ~strikethrough text~\n• `inline code`\n• Automatically linked text www.ynab.com\n• Link with <http://www.ynab.com|custom text>\n>Block quote\n```Multi-line\ncode```"
unfurl_links: false