Skip to content

Commit

Permalink
Adding dependabot and actions CI for java
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-murray authored Mar 17, 2021
1 parent 14b98e5 commit bd7a986
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 2 deletions.
29 changes: 29 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
version: 2

registries:
java-private-library-maven:
type: maven-repository
url: https://maven.pkg.github.com/octodemo/java-private-library
username: octodemobot
password: ${{ secrets.OCTODEMOBOT_PACKAGES_PAT }}

npm-github:
type: npm-registry
url: https://npm.pkg.github.com
token: ${{ secrets.OCTODEMOBOT_PACKAGES_PAT }}

updates:
- package-ecosystem: maven
directory: "/java"
registries:
- "java-private-library-maven"
schedule:
interval: daily
versioning-strategy: auto

- package-ecosystem: npm
directory: "/nodejs"
schedule:
interval: daily
versioning-strategy: auto
33 changes: 33 additions & 0 deletions .github/workflows/java_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Java CI with Maven

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:
name: Build and Publish
runs-on: ubuntu-20.04

steps:
- name: Checkout
uses: actions/checkout@v2

- 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
4 changes: 2 additions & 2 deletions nodejs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "echo \"no tests, all good though!\" && exit 0"
},
"repository": {
"type": "git",
"url": "git+https://github.com/octodemo/package-updates.git"
},
"keywords": [],
"author": "",
"license": "ISC",
"license": "MIT",
"bugs": {
"url": "https://github.com/octodemo/package-updates/issues"
},
Expand Down

0 comments on commit bd7a986

Please sign in to comment.