2727 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
2828 outputs :
2929 matrix : ${{ steps.set-matrix.outputs.matrix }}
30- issue : ${{ steps.set-issue.outputs.issue }}
3130 steps :
3231 - name : " ☁️ Checkout repository"
3332 uses : actions/checkout@v4
4746 git config --local user.name "Github Actions"
4847 git switch -C check-new-library-versions/$(date '+%Y-%m-%d')
4948 git push origin check-new-library-versions/$(date '+%Y-%m-%d')
50- - name : " 🔨 Create issue"
51- id : set-issue
52- run : |
53- git config --local user.email "[email protected] " 54- git config --local user.name "Github Actions"
55-
56- issue_url=$(gh issue create --title "List unsupported library versions" --body "This issue lists unsupported versions of the existing libraries in the repo")
57- echo "::set-output name=issue::$issue_url"
5849
5950 test-all-metadata :
6051 name : " 🧪 ${{ matrix.coordinates }} (GraalVM for JDK ${{ matrix.version }} @ ${{ matrix.os }})"
@@ -118,9 +109,18 @@ jobs:
118109 - name : " ❗ New library is not supported"
119110 if : failure()
120111 run : |
121- git config --local user.email "[email protected] " 122- git config --local user.name "Github Actions"
123- gh issue comment "${{ needs.get-all-libraries.outputs.issue }}" --body "${{ matrix.coordinates }}"
112+ LIB=$(echo "${{ matrix.coordinates }}" | sed 's/:/_/g')
113+ touch $LIB
114+ echo "UNSUPPORTED_LIB=$LIB" >> $GITHUB_ENV
115+ - name : " Upload artifacts"
116+ if : failure()
117+ id : upload
118+ continue-on-error : true
119+ uses : actions/upload-artifact@v4
120+ with :
121+ name : ${{ env.UNSUPPORTED_LIB }}
122+ path : ${{ env.UNSUPPORTED_LIB }}
123+ retention-days : 1
124124
125125 process-results :
126126 name : " 🧪 Process results"
@@ -147,13 +147,22 @@ jobs:
147147 git fetch origin check-new-library-versions/$(date '+%Y-%m-%d')
148148 git checkout check-new-library-versions/$(date '+%Y-%m-%d')
149149 gh pr create --title "Update supported library versions" --body "This pull request updates supported versions of the existing libraries in the repo"
150- - name : " ✏️ Edit issue for unsupported versions"
150+ - name : " Download artifacts for unsupported versions"
151+ uses : actions/download-artifact@v4
152+ with :
153+ path : ./unsupported
154+ - name : " ✏️ Issue for unsupported versions"
151155 run : |
152156 git config --local user.email "[email protected] " 153157 git config --local user.name "Github Actions"
154- ALL_COMMENTS=$(gh issue view "${{ needs.get-all-libraries.outputs.issue }}" --comments)
155158
156- FORMATTED_BODY=$(./gradlew -q extractLibrariesGroupsFromGithubComments --comments="$ALL_COMMENTS")
157- gh issue create --title "List unsupported libraries versions" --body "$FORMATTED_BODY"
159+ LABEL="library-update"
160+ ALL_LIBRARIES=$(ls unsupported)
161+ FORMATTED_BODY=$(./gradlew -q groupLibrariesByName --libraries="$ALL_LIBRARIES")
158162
159- gh issue close "${{ needs.get-all-libraries.outputs.issue }}"
163+ EXISTING_ISSUE=$(gh issue list --label "$LABEL" --state open --limit 1 --json url | jq -r '.[0].url')
164+ if [ $EXISTING_ISSUE != "null" ]; then
165+ gh issue edit $EXISTING_ISSUE --body "$FORMATTED_BODY"
166+ else
167+ gh issue create --title "List unsupported libraries versions" --body "$FORMATTED_BODY" --label $LABEL
168+ fi
0 commit comments