Fix PR test reports action #49
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
| # Do not modify! | |
| # This file was generated from a template using https://github.com/StefMa/pkl-gha | |
| name: Pull Request | |
| 'on': | |
| pull_request: {} | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-java@v5 | |
| with: | |
| java-version: '21' | |
| distribution: temurin | |
| cache: gradle | |
| - name: Gradle build | |
| run: ./gradlew build | |
| - name: Upload Test Result XML | |
| if: '!cancelled()' | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: test-results-xml-build-and-test | |
| path: build/test-results/**/*.xml | |
| if-no-files-found: ignore | |
| upload-event-file: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Upload event file | |
| if: '!cancelled()' | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: test-results-event-file | |
| path: ${{ github.event_path }} | |
| check-pkl-github-actions: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Setup Pkl | |
| id: setup-pkl | |
| env: | |
| PKL_VERSION: 0.30.0 | |
| PKL_FILENAME: pkl | |
| PKL_DOWNLOAD_URL: https://github.com/apple/pkl/releases/download/0.30.0/pkl-linux-amd64 | |
| shell: bash | |
| run: |- | |
| DIR="$(mktemp -d /tmp/pkl-$PKL_VERSION-XXXXXX)" | |
| PKL_EXEC="$DIR/$PKL_FILENAME" | |
| curl -sfL -o $PKL_EXEC "$PKL_DOWNLOAD_URL" | |
| chmod +x $PKL_EXEC | |
| echo "$DIR" >> "$GITHUB_PATH" | |
| echo "pkl_exec=$PKL_EXEC" >> "$GITHUB_OUTPUT" | |
| - shell: bash | |
| run: pkl eval -m .github/ --project-dir .github/ .github/index.pkl | |
| - name: check git status | |
| shell: bash | |
| run: |- | |
| if [ -n "$(git status --porcelain)" ]; then | |
| echo "Running pkl resulted in a diff! You likely need to run 'pkl eval' and commit the changes." | |
| git diff --name-only | |
| exit 1 | |
| fi |