mirror of
https://github.com/docker/docs.git
synced 2026-04-04 18:28:58 +07:00
## Description The Slack notification workflow for Desktop release notes PRs fails when the PR is opened from a fork because GitHub doesn't expose repository secrets to `pull_request` events from forks. This PR splits the workflow into two: 1. **Release Notes PR Trigger** — runs on `pull_request`, saves PR details (URL, title, author) as an artifact. No secrets needed. 2. **Notify Slack on Desktop Release Notes PR** — runs on `workflow_run` after the trigger completes, downloads the artifact, and sends the Slack notification. Has access to secrets since `workflow_run` runs in the context of the base repository. ## Related issues or tickets Fixes the `SlackError: Missing input! A token must be provided` error in the notify-release-notes-pr workflow. ## Reviews - [x] Technical review Signed-off-by: Lorena Rangel <lorena.rangel@docker.com>
29 lines
739 B
YAML
29 lines
739 B
YAML
name: Release Notes PR Trigger
|
|
|
|
on:
|
|
pull_request:
|
|
types: [opened]
|
|
paths:
|
|
- content/manuals/desktop/release-notes.md
|
|
|
|
jobs:
|
|
trigger:
|
|
runs-on: ubuntu-24.04
|
|
if: github.repository_owner == 'docker'
|
|
steps:
|
|
- name: Save PR details
|
|
run: |
|
|
cat <<'EOF' > pr-details.json
|
|
{
|
|
"url": "${{ github.event.pull_request.html_url }}",
|
|
"title": "${{ github.event.pull_request.title }}",
|
|
"author": "${{ github.event.pull_request.user.login }}"
|
|
}
|
|
EOF
|
|
|
|
- name: Upload PR details
|
|
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7
|
|
with:
|
|
name: pr-details
|
|
path: pr-details.json
|