Skip to content

Commit

Permalink
Improved Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcelCoding committed Mar 30, 2021
1 parent 96b2b9b commit f6ce078
Showing 1 changed file with 24 additions and 12 deletions.
36 changes: 24 additions & 12 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches: [ main ]
tags: [ 'v*' ]
pull_request:
pull_request: # if also at push, add "type=ref,event=branch" to docker meta

env:
JAVA_VERSION: 15
Expand All @@ -14,6 +14,10 @@ jobs:
lint:
runs-on: ubuntu-latest

strategy:
matrix:
system: [ checkstyle, spotbugs, pmd ]

steps:
- uses: actions/checkout@v2

Expand All @@ -35,23 +39,26 @@ jobs:
run: chmod +x gradlew

- name: Lint with Gradle
run: ./gradlew checkstyleMain checkstyleTest spotbugsMain spotbugsTest pmdMain pmdTest --stacktrace --no-daemon --refresh-dependencies
run: ./gradlew ${{ matrix.system }}Main ${{ matrix.system }}Test --stacktrace --no-daemon --refresh-dependencies

- name: Annotate Checkstyle Issues
- name: Annotate checkstyle violations
if: ${{ matrix.system }} == 'checkstyle'
uses: jwgmeligmeyling/checkstyle-github-action@master
with:
path: '**/build/reports/checkstyle/*.xml'

- name: Annotate SpotBugs Issues
uses: jwgmeligmeyling/spotbugs-github-action@master
with:
path: '**/build/reports/spotbugs/*.xml'

- name: Annotate PMD Issues
- name: Annotate pmd violations
if: ${{ matrix.system }} == 'pmd'
uses: jwgmeligmeyling/pmd-github-action@master
with:
path: '**/build/reports/pmd/*.xml'

- name: Annotate spotbugs violations
if: ${{ matrix.system }} == 'spotbugs'
uses: jwgmeligmeyling/spotbugs-github-action@master
with:
path: '**/build/reports/spotbugs/*.xml'

nohttp:
runs-on: ubuntu-latest

Expand Down Expand Up @@ -166,11 +173,10 @@ jobs:
tags: |
type=edge
type=ref,event=pr
type=ref,event=branch
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
flavor: |
prefix=${{ matrix.jvm-impl }}
suffix=-${{ matrix.jvm-impl }}
latest=${{ matrix.jvm-impl == 'hotspot' }}
- uses: docker/setup-qemu-action@v1
Expand Down Expand Up @@ -223,8 +229,14 @@ jobs:
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
- name: Inspect image
if: github.event_name != 'pull_request'
run: |
docker pull ${{ env.IMAGE_NAME }}:${{ steps.docker_meta.outputs.version }}
docker image inspect ${{ env.IMAGE_NAME }}:${{ steps.docker_meta.outputs.version }}
- name: Check manifest
if: ${{ github.event_name != 'pull_request' }}
if: github.event_name != 'pull_request'
run: |
docker buildx imagetools inspect ${{ env.IMAGE_NAME }}:${{ steps.docker_meta.outputs.version }}
docker buildx imagetools inspect ghcr.io/${{ env.IMAGE_NAME }}:${{ steps.docker_meta.outputs.version }}

0 comments on commit f6ce078

Please sign in to comment.