Skip to content

Commit

Permalink
Separating dependadot for java builds
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-murray authored Mar 17, 2021
1 parent 343294b commit 3a4fa66
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 4 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/java_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@ name: Java - CI with Maven

on:
push:
branches-ignore:
- 'dependabot/**'
paths:
- java/**
- .github/workflows/java_build.yml

pull_request_target:
paths:
- java/**

jobs:
build:
name: Build and Publish
Expand Down
47 changes: 47 additions & 0 deletions .github/workflows/java_dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Java - CI with Maven - Dependabot

on:
pull_request_target:
paths:
- java/**/pom.xml

jobs:
build:
name: Build and Publish
if: contains(github.event.pull_request.labels.*.name, 'dependencies') && contains(github.event.sender.login, 'dependabot')

runs-on: ubuntu-20.04

steps:
- name: Display Context
uses: actions/github-script@v3
with:
script: |
core.startGroup('Context');
core.info(`Event: ${context.eventName}`);
core.info(`Payload:`);
core.info(JSON.stringify(context.payload, null, 2));
core.endGroup();
- name: Checkout
uses: actions/checkout@v2
with:
persist-credentials: false
ref: ${{ github.event.pull_request.head.sha }}

- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8

server-id: github
server-username: MAVEN_USERAME
server-password: MAVEN_GHPR_PASSWORD

- name: Build with Maven
env:
MAVEN_USERNAME: octodemobot
MAVEN_GHPR_PASSWORD: ${{ secrets.OCTODEMO_OCTODEMOBOT_TOKEN }}
working-directory: java
run: |
mvn -B package --file pom.xml

0 comments on commit 3a4fa66

Please sign in to comment.