-
Notifications
You must be signed in to change notification settings - Fork 465
42 lines (42 loc) · 1.65 KB
/
breaking_change_feed.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
39
40
41
42
# This workflow updates feeds when the label `BREAKING` is applied to PRs.
name: Send breaking to Zulip
on:
pull_request:
types: [ labeled ]
permissions:
contents: read
jobs:
update-zulip-breaking:
if: ${{ (github.event.label.name == 'BREAKING' || github.event.label.name == 'zulip test') && github.repository == github.event.pull_request.head.repo.full_name }}
runs-on: ubuntu-latest
steps:
- uses: julia-actions/setup-julia@512e2ab44f5848ea62bddd21d1ee906e989b0360 # v2.4.0
with:
version: 1.6.2
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v3.3.0
- name: Collect Zulip info
id: zulip
shell: julia --color=yes {0}
run: |
include(joinpath(ENV["GITHUB_WORKSPACE"], ".ci", "parse_env.jl"))
text, pr_url = parse_env(ENV)
using Pkg
Pkg.activate(mktempdir())
Pkg.add(name="GitHubActions", version="0.1")
using GitHubActions
content = string("**", ENV["PR_NAME"], "**\n\n", text)
set_output("content", content)
env:
PR_NAME: ${{ github.event.pull_request.title }}
PR_NUMBER: ${{ github.event.number }}
PR_BODY: ${{ github.event.pull_request.body }}
- name: Update Zulip feed
uses: zulip/github-actions-zulip/send-message@e4c8f27c732ba9bd98ac6be0583096dea82feea5
with:
api-key: ${{ secrets.ZULIP_API_KEY }}
email: 'general-registry-announcer-bot@julialang.zulipchat.com'
organization-url: 'https://julialang.zulipchat.com'
to: 'breaking-changes-feed'
type: 'stream'
topic: 'Package breaking updates'
content: ${{ steps.zulip.outputs.content }}