File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -623,3 +623,38 @@ jobs:
623623 run : exit 1
624624 - name : succeed if everything else passed
625625 run : echo "Validation succeeded"
626+
627+ generate-ec-release-notes-pr :
628+ runs-on : ubuntu-latest
629+ needs : [release, release-app, get-tag]
630+ steps :
631+ - name : Checkout
632+ uses : actions/checkout@v4
633+ with :
634+ fetch-depth : 0
635+
636+ - name : Check if tag is from main branch
637+ id : check-main
638+ run : |
639+ # Get the commit that the tag points to
640+ TAG_COMMIT=$(git rev-list -n 1 ${{ github.ref }})
641+
642+ # Check if this commit is an ancestor of the main branch (or the same commit)
643+ if git merge-base --is-ancestor $TAG_COMMIT origin/main; then
644+ echo "Tag was created from main branch"
645+ echo "is_from_main=true" >> $GITHUB_OUTPUT
646+ else
647+ echo "Tag was NOT created from main branch"
648+ echo "is_from_main=false" >> $GITHUB_OUTPUT
649+ fi
650+
651+ - name : Generate EC Release Notes PR
652+ if : steps.check-main.outputs.is_from_main == 'true'
653+ env :
654+ GIT_TAG : ${{ needs.get-tag.outputs.tag-name }}
655+ GH_PAT : ${{ secrets.GH_PAT }}
656+ run : |
657+ curl -H "Authorization: token $GH_PAT" \
658+ -H 'Accept: application/json' \
659+ -d "{\"event_type\": \"embedded-cluster-release-notes\", \"client_payload\": {\"version\": \"${GIT_TAG}\"}}" \
660+ "https://api.github.com/repos/replicatedhq/replicated-docs/dispatches"
You can’t perform that action at this time.
0 commit comments