27
27
GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
28
28
outputs :
29
29
matrix : ${{ steps.set-matrix.outputs.matrix }}
30
- issue : ${{ steps.set-issue.outputs.issue }}
31
30
steps :
32
31
- name : " ☁️ Checkout repository"
33
32
uses : actions/checkout@v4
47
46
git config --local user.name "Github Actions"
48
47
git switch -C check-new-library-versions/$(date '+%Y-%m-%d')
49
48
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 "actions@github.com"
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"
58
49
59
50
test-all-metadata :
60
51
name : " 🧪 ${{ matrix.coordinates }} (GraalVM for JDK ${{ matrix.version }} @ ${{ matrix.os }})"
@@ -118,9 +109,18 @@ jobs:
118
109
- name : " ❗ New library is not supported"
119
110
if : failure()
120
111
run : |
121
- git config --local user.email "actions@github.com"
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
124
124
125
125
process-results :
126
126
name : " 🧪 Process results"
@@ -147,13 +147,22 @@ jobs:
147
147
git fetch origin check-new-library-versions/$(date '+%Y-%m-%d')
148
148
git checkout check-new-library-versions/$(date '+%Y-%m-%d')
149
149
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"
151
155
run : |
152
156
git config --local user.email "actions@github.com"
153
157
git config --local user.name "Github Actions"
154
- ALL_COMMENTS=$(gh issue view "${{ needs.get-all-libraries.outputs.issue }}" --comments)
155
158
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")
158
162
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