bump actions/download-artifact from 3 to 4. Fix bug with README.md file failing to download. (#11754)

This commit is contained in:
Leithen 2024-11-08 12:24:36 -07:00 committed by GitHub
parent 8a0ccd9c2d
commit 0d6a64e046
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -86,13 +86,26 @@ jobs:
gem install awesome_bot
- name: Set output
id: set-output
run: echo "FILENAME=$(echo ${{ matrix.file }} | grep -oE '[a-zA-Z0-9_-]+(\.yml|\.md)')" >> "$GITHUB_OUTPUT"
# FILENAME takes the complete file path and strips everything before the final '/'
# FILEPATH replaces all '/' with '-' in the file path since '/' is not allowed in upload artifact name
# Due to a bug in actions/download-artifact, we need to rename README.md to BASE_README.md
run: |
echo "FILENAME=$(echo ${{ matrix.file }} | grep -oE '[a-zA-Z0-9_-]+(\.yml|\.md)')" >> "$GITHUB_OUTPUT"
file_path="${{ matrix.file }}"
file_path="${file_path//\//-}"
if [[ "$file_path" == "README.md" ]]; then
file_path="BASE_README.md"
fi
echo "FILEPATH=${file_path}" >> "$GITHUB_OUTPUT"
- name: "Check URLs of file: ${{ matrix.file }}"
run: |
awesome_bot "${{ matrix.file }}" --allow-redirect --allow-dupe --allow-ssl || true;
- uses: actions/upload-artifact@v4
with:
name: ${{ steps.set-output.outputs.FILENAME}}
name: ${{ steps.set-output.outputs.FILEPATH }}
path: ${{ github.workspace }}/ab-results-*.json
@ -104,9 +117,8 @@ jobs:
- name: Checkout # for having the sources of the local action
uses: actions/checkout@v4
# download and unzip the ab-results-*.json generated by job-matrix: check-urls
- uses: actions/download-artifact@v3
with:
name: ${{ steps.set-output.outputs.FILENAME}}
- name: Download artifacts
uses: actions/download-artifact@v4
- name: Generate Summary Report
uses: ./.github/actions/awesomebot-gh-summary-action
with: