Repository navigation
Bump dawidd6/action-download-artifact from 25 to 27 #211
Workflow file for this run
This file contains hidden or 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
| # Licensed to the Apache Software Foundation (ASF) under one or more | |
| # contributor license agreements. See the NOTICE file distributed with | |
| # this work for additional information regarding copyright ownership. | |
| # The ASF licenses this file to You under the Apache License, Version 2.0 | |
| # (the "License"); you may not use this file except in compliance with | |
| # the License. You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, software | |
| # distributed under the License is distributed on an "AS IS" BASIS, | |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| # See the License for the specific language governing permissions and | |
| # limitations under the License. | |
| # | |
| # Apache Yetus test-patch: pre-commit patch testing (apache/yetus-test-patch-action). | |
| # The action runs inside ghcr.io/apache/yetus:0.15.1 — javahome must be a JDK path | |
| # inside that image (OpenJDK 11 on amd64), not actions/setup-java on the runner. | |
| # See https://yetus.apache.org/documentation/0.15.1/precommit/ | |
| # | |
| # PR comments are posted by yetus-comment.yml (workflow_run). Fork pull_request | |
| # jobs cannot write comments with GITHUB_TOKEN; do not use pull_request_target. | |
| --- | |
| name: Apache Yetus | |
| on: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| branches: [master] | |
| concurrency: | |
| group: yetus-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| statuses: write | |
| jobs: | |
| yetus: | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 45 | |
| env: | |
| PATCH_DIR: ${{ github.workspace }}/out | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 | |
| - name: Cache Ivy dependencies | |
| uses: actions/cache@v6 | |
| with: | |
| path: ~/.ivy2/cache | |
| key: ${{ runner.os }}-ivy-${{ hashFiles('ivy/ivy.xml', 'src/plugin/**/ivy.xml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-ivy- | |
| - name: Apache Yetus test-patch | |
| uses: apache/yetus-test-patch-action@0.15.1 | |
| with: | |
| basedir: . | |
| buildtool: nobuild | |
| githubtoken: ${{ secrets.GITHUB_TOKEN }} | |
| javahome: /usr/lib/jvm/java-11-openjdk-amd64 | |
| patchdir: /github/workspace/out | |
| plugins: all,-jira,-gitlab,-unit,-compile | |
| project: nutch | |
| - name: Artifact output | |
| if: always() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: apacheyetuspatchdir | |
| path: ${{ env.PATCH_DIR }} | |
| - name: Install pandoc | |
| if: always() && github.event_name == 'pull_request' | |
| run: sudo apt-get update && sudo apt-get install -y pandoc | |
| - name: Convert HTML report to Markdown | |
| if: always() && github.event_name == 'pull_request' | |
| run: | | |
| OUT="${{ env.PATCH_DIR }}" | |
| echo "## Apache Yetus test-patch report" > yetus-report.md | |
| echo "" >> yetus-report.md | |
| if [ -f "$OUT/report.html" ]; then | |
| pandoc "$OUT/report.html" -f html -t gfm >> yetus-report.md 2>/dev/null || { | |
| echo "Pandoc conversion failed; using brief report." >> yetus-report.md | |
| echo '```' >> yetus-report.md | |
| cat "$OUT/brief.txt" >> yetus-report.md 2>/dev/null || true | |
| echo '```' >> yetus-report.md | |
| } | |
| elif [ -f "$OUT/brief.txt" ]; then | |
| echo '```' >> yetus-report.md | |
| cat "$OUT/brief.txt" >> yetus-report.md | |
| echo '```' >> yetus-report.md | |
| else | |
| echo "No Yetus report or brief found." >> yetus-report.md | |
| fi | |
| - name: Truncate if over comment limit | |
| if: always() && github.event_name == 'pull_request' | |
| run: | | |
| MAX=60000 | |
| if [ $(wc -c < yetus-report.md) -gt $MAX ]; then | |
| head -c $MAX yetus-report.md > yetus-report-trimmed.md | |
| echo "" >> yetus-report-trimmed.md | |
| echo "" >> yetus-report-trimmed.md | |
| echo "_Report truncated (GitHub comment limit). Full HTML in apacheyetuspatchdir artifact as report.html._" >> yetus-report-trimmed.md | |
| mv yetus-report-trimmed.md yetus-report.md | |
| fi | |
| - name: Record PR number and sticky marker | |
| if: always() && github.event_name == 'pull_request' | |
| run: | | |
| echo "" >> yetus-report.md | |
| echo "<!-- nutch-yetus-report -->" >> yetus-report.md | |
| echo "${{ github.event.pull_request.number }}" > pr-number | |
| - name: Upload Yetus PR comment artifacts | |
| if: always() && github.event_name == 'pull_request' | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: yetus-pr-comment | |
| path: | | |
| yetus-report.md | |
| pr-number |