Skip to content

Commit ac9d639

Browse files
committed
fix: put discussion back the way it was
Signed-off-by: jmeridth <jmeridth@gmail.com>
1 parent 53a0992 commit ac9d639

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

.github/workflows/release.yaml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ jobs:
287287
288288
release_discussion:
289289
needs: create_release
290-
if: ${{ secrets.discussion-repository-id && secrest.discussion-category-id && inputs.publish && needs.create_release.outputs.full-tag != '' }}
290+
if: ${{ inputs.publish && needs.create_release.outputs.full-tag != '' }}
291291
runs-on: ubuntu-latest
292292
permissions:
293293
contents: read # Required by harden-runner
@@ -297,10 +297,21 @@ jobs:
297297
DISCUSSION_CATEGORY_ID: ${{ secrets.discussion-category-id }}
298298
steps:
299299
- name: Harden the runner (Audit all outbound calls)
300+
if: ${{ steps.check-inputs.outputs.skip == 'false' }}
300301
uses: step-security/harden-runner@fe104658747b27e96e4f7e80cd0a94068e53901d # v2.16.1
301302
with:
302303
egress-policy: audit
303304

305+
- name: Check discussion inputs
306+
id: check-inputs
307+
run: |
308+
if [ -z "${DISCUSSION_REPOSITORY_ID}" ] || [ -z "${DISCUSSION_CATEGORY_ID}" ]; then
309+
echo "::notice::discussion-repository-id and/or discussion-category-id secrets are not set, skipping discussion creation"
310+
echo "skip=true" >> "$GITHUB_OUTPUT"
311+
else
312+
echo "skip=false" >> "$GITHUB_OUTPUT"
313+
fi
314+
304315
- name: Create an Announcement Discussion for Release
305316
if: ${{ steps.check-inputs.outputs.skip == 'false' }}
306317
uses: abirismyname/create-discussion@c2b7c825241769dda523865ae444a879f6bbd0e0

0 commit comments

Comments
 (0)