-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use artifacts to collect results from failed jobs
- Loading branch information
Showing
3 changed files
with
33 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,6 @@ jobs: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
outputs: | ||
matrix: ${{ steps.set-matrix.outputs.matrix }} | ||
issue: ${{ steps.set-issue.outputs.issue }} | ||
steps: | ||
- name: "☁️ Checkout repository" | ||
uses: actions/checkout@v4 | ||
|
@@ -47,14 +46,6 @@ jobs: | |
git config --local user.name "Github Actions" | ||
git switch -C check-new-library-versions/$(date '+%Y-%m-%d') | ||
git push origin check-new-library-versions/$(date '+%Y-%m-%d') | ||
- name: "🔨 Create issue" | ||
id: set-issue | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "Github Actions" | ||
issue_url=$(gh issue create --title "List unsupported library versions" --body "This issue lists unsupported versions of the existing libraries in the repo") | ||
echo "::set-output name=issue::$issue_url" | ||
test-all-metadata: | ||
name: "🧪 ${{ matrix.coordinates }} (GraalVM for JDK ${{ matrix.version }} @ ${{ matrix.os }})" | ||
|
@@ -118,9 +109,18 @@ jobs: | |
- name: "❗ New library is not supported" | ||
if: failure() | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "Github Actions" | ||
gh issue comment "${{ needs.get-all-libraries.outputs.issue }}" --body "${{ matrix.coordinates }}" | ||
LIB=$(echo "${{ matrix.coordinates }}" | sed 's/:/_/g') | ||
touch $LIB | ||
echo "UNSUPPORTED_LIB=$LIB" >> $GITHUB_ENV | ||
- name: "Upload artifacts" | ||
if: failure() | ||
id: upload | ||
continue-on-error: true | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ env.UNSUPPORTED_LIB }} | ||
path: ${{ env.UNSUPPORTED_LIB }} | ||
retention-days: 1 | ||
|
||
process-results: | ||
name: "🧪 Process results" | ||
|
@@ -147,13 +147,22 @@ jobs: | |
git fetch origin check-new-library-versions/$(date '+%Y-%m-%d') | ||
git checkout check-new-library-versions/$(date '+%Y-%m-%d') | ||
gh pr create --title "Update supported library versions" --body "This pull request updates supported versions of the existing libraries in the repo" | ||
- name: "✏️ Edit issue for unsupported versions" | ||
- name: "Download artifacts for unsupported versions" | ||
uses: actions/download-artifact@v4 | ||
with: | ||
path: ./unsupported | ||
- name: "✏️ Issue for unsupported versions" | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "Github Actions" | ||
ALL_COMMENTS=$(gh issue view "${{ needs.get-all-libraries.outputs.issue }}" --comments) | ||
FORMATTED_BODY=$(./gradlew -q extractLibrariesGroupsFromGithubComments --comments="$ALL_COMMENTS") | ||
gh issue create --title "List unsupported libraries versions" --body "$FORMATTED_BODY" | ||
LABEL="library-update" | ||
ALL_LIBRARIES=$(ls unsupported) | ||
FORMATTED_BODY=$(./gradlew -q groupLibrariesByName --libraries="$ALL_LIBRARIES") | ||
gh issue close "${{ needs.get-all-libraries.outputs.issue }}" | ||
EXISTING_ISSUE=$(gh issue list --label "$LABEL" --state open --limit 1 --json url | jq -r '.[0].url') | ||
if [ $EXISTING_ISSUE != "" ]; then | ||
gh issue edit $EXISTING_ISSUE --body "$FORMATTED_BODY" | ||
else | ||
gh issue create --title "List unsupported libraries versions" --body "$FORMATTED_BODY" --label $LABEL | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters