Skip to content

Commit 53a0992

Browse files
committed
fix: move conditional to create discussion sooner
Signed-off-by: jmeridth <jmeridth@gmail.com>
1 parent e449076 commit 53a0992

1 file changed

Lines changed: 1 addition & 11 deletions

File tree

.github/workflows/release.yaml

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ jobs:
287287
288288
release_discussion:
289289
needs: create_release
290-
if: ${{ inputs.publish && needs.create_release.outputs.full-tag != '' }}
290+
if: ${{ secrets.discussion-repository-id && secrest.discussion-category-id && inputs.publish && needs.create_release.outputs.full-tag != '' }}
291291
runs-on: ubuntu-latest
292292
permissions:
293293
contents: read # Required by harden-runner
@@ -301,16 +301,6 @@ jobs:
301301
with:
302302
egress-policy: audit
303303

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

0 commit comments

Comments
 (0)