on: pull_request
name: PR Build
jobs:
  build:
    name: Build
    runs-on: ubuntu-latest
    steps:
      - uses: actions/labeler@v4
        with:
          repo-token: "${{ secrets.GITHUB_TOKEN }}"
      - uses: actions/checkout@v3
      - uses: actions/setup-java@v2
        with:
          distribution: temurin
          java-version: 17
      - name: Cache local Maven repository
        uses: actions/cache@v3
        with:
          path: ~/.m2/repository
          key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
          restore-keys: |
            ${{ runner.os }}-maven-
      - name: Package
        run: ./mvnw clean verify -P git-commit,integration --no-transfer-progress
      - name: Set up QEMU
        uses: docker/setup-qemu-action@v1
      - name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v1
      - name: Build and push
        uses: docker/build-push-action@v2
        with:
          context: .
          platforms: linux/amd64
          push: false
          tags: |
            ghcr.io/nincodedo/ninbot:latest
            ghcr.io/nincodedo/ninbot:${{ github.sha }}
on: pull_request
name: PR Build
jobs:
  build:
    name: Build
    runs-on: ubuntu-latest
    steps:
      - uses: actions/labeler@v4
        with:
          repo-token: "${{ secrets.GITHUB_TOKEN }}"
      - uses: actions/checkout@v3
      - name: 'Dependency Review'
        uses: actions/dependency-review-action@v1
      - uses: actions/setup-java@v2
        with:
          distribution: temurin
          java-version: 17
      - name: Cache local Maven repository
        uses: actions/cache@v3
        with:
          path: ~/.m2/repository
          key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
          restore-keys: |
            ${{ runner.os }}-maven-
      - name: Package
        run: ./mvnw clean verify -P git-commit,integration --no-transfer-progress
      - name: Set up QEMU
        uses: docker/setup-qemu-action@v1
      - name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v1
      - name: Build and push
        uses: docker/build-push-action@v2
        with:
          context: .
          platforms: linux/amd64
          push: false
          tags: |
            ghcr.io/nincodedo/ninbot:latest
            ghcr.io/nincodedo/ninbot:${{ github.sha }}

Add Dependency Review action to PR builds
Add Dependency Review action to PR builds