Refactor Ant deployment #9233
Workflow file for this run
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
name: Java checkstyle | |
on: | |
push: | |
branches: | |
- master | |
paths: | |
- 'java/**.java' | |
- 'java/**.xml' | |
- '.github/workflows/java-checkstyle.yml' | |
pull_request: | |
types: | |
- opened | |
- reopened | |
- synchronize | |
paths: | |
# We also trigger on non-java code changes since this triggers sonarcloud scanner after | |
- '**.py' | |
- 'web/html/src/**.ts' | |
- 'web/html/src/**.tsx' | |
- 'java/**.java' | |
- 'java/**.xml' | |
- '.github/workflows/java-checkstyle.yml' | |
jobs: | |
checkstyle: | |
runs-on: ubuntu-latest | |
container: registry.opensuse.org/systemsmanagement/uyuni/master/docker/containers/uyuni-master-pgsql:latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache dependencies | |
id: cache-dependencies | |
uses: actions/cache@v4 | |
with: | |
path: java/lib | |
key: ${{ runner.os }}-java-lib-${{ hashFiles('java/buildconf/ivy/*.*') }} | |
- name: Resolve dependencies | |
if: steps.cache-dependencies.outputs.cache-hit != 'true' | |
run: | | |
ant -f java/manager-build.xml ivy | |
- name: Run checkstyle | |
run: ant -f java/manager-build.xml checkstyle | |
- name: Compress build results | |
run: tar cf java-build.tar.gz java/build java/lib | |
- name: Save PR data to file | |
run: | | |
echo "PR_NUMBER=${{ github.event.number }}" >>pr_data | |
echo "PR_BASE=${{ github.event.pull_request.base.ref }}" >>pr_data | |
- name: Archive Java build artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: java-built-files | |
path: | | |
java-build.tar.gz | |
pr_data |