New version: DynamicDiff v0.2.0 #82586
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow updates feeds when the label `new package` is applied to PRs. | |
name: Send to feeds | |
on: | |
pull_request: | |
types: [ labeled ] | |
permissions: | |
contents: read | |
jobs: | |
update-slack: | |
if: ${{ github.event.label.name == 'new package' && github.repository == github.event.pull_request.head.repo.full_name }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: julia-actions/setup-julia@5c9647d97b78a5debe5164e9eec09d653d29bd71 # v2.6.1 | |
with: | |
version: 1.6.2 | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Send to Slack | |
shell: julia --color=yes {0} | |
run: | | |
endpoint = ENV["SLACK_ENDPOINT"] | |
if isempty(endpoint) | |
@info "Endpoint not specified; missing secret? Exiting." | |
exit(0) | |
end | |
include(joinpath(ENV["GITHUB_WORKSPACE"], ".ci", "parse_env.jl")) | |
text, pr_url = parse_env(ENV) | |
using Pkg | |
Pkg.activate(mktempdir()) | |
Pkg.add(name="Slack", version="0.1") | |
using Slack | |
data = Dict("attachments" => | |
[Dict("fallback" => ENV["PR_NAME"], | |
"color" => "#36a64f", | |
"title" => ENV["PR_NAME"], | |
"title_link" => pr_url, | |
"text" => text, | |
)]) | |
if !startswith(endpoint, "/") | |
endpoint = string("/", endpoint) | |
end | |
@info "Told Slack: $(data)" | |
response = sendattachmenttoslack(data, endpoint) | |
@info "Slack said: $response" | |
env: | |
SLACK_ENDPOINT: ${{ secrets.JULIALANGSLACKENDPOINT }} | |
PR_NAME: ${{ github.event.pull_request.title }} | |
PR_NUMBER: ${{ github.event.number }} | |
PR_BODY: ${{ github.event.pull_request.body }} | |
update-zulip: | |
if: ${{ (github.event.label.name == 'new package' || 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@5c9647d97b78a5debe5164e9eec09d653d29bd71 # v2.6.1 | |
with: | |
version: 1.6.2 | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- 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 # v1.0.2 | |
with: | |
api-key: ${{ secrets.ZULIP_API_KEY }} | |
email: '[email protected]' | |
organization-url: 'https://julialang.zulipchat.com' | |
to: 'new-packages-feed' | |
type: 'stream' | |
topic: 'New package registrations' | |
content: ${{ steps.zulip.outputs.content }} |