Skip to content

Commit

Permalink
Add github action build
Browse files Browse the repository at this point in the history
  • Loading branch information
skjolber committed Aug 22, 2023
1 parent e65f122 commit 8a00502
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 1 deletion.
21 changes: 21 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Run build on PRs
on: pull_request
jobs:
gradle:
strategy:
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17

- name: Setup Gradle
uses: gradle/gradle-build-action@v2

- name: Execute Gradle build
run: ./gradlew build

23 changes: 23 additions & 0 deletions .github/workflows/push-branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Run build on PRs
on:
push:
branches-ignore:
- $default-branch
jobs:
gradle:
strategy:
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17

- name: Setup Gradle
uses: gradle/gradle-build-action@v2

- name: Execute Gradle build
run: ./gradlew build
23 changes: 23 additions & 0 deletions .github/workflows/push-master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Run build on PRs
on:
push:
branches:
- $default-branch
jobs:
gradle:
strategy:
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17

- name: Setup Gradle
uses: gradle/gradle-build-action@v2

- name: Execute Gradle build
run: ./gradlew build
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ configure(libraryProjects()) {
username = "${project.properties['entur_artifactory_user'] ?: System.env.ARTIFACTORY_USER}"
password = "${project.properties['entur_artifactory_password'] ?: System.env.ARTIFACTORY_PASSWORD}"
}
url = "${project.properties['entur_artifactory_contextUrl'] ?: System.env.ARTIFACTORY_URL}/partner-snapshot-local"
url = "${project.properties['entur_artifactory_contextUrl'] ?: System.env.ARTIFACTORY_URL}/entur-snapshot-local"
}
}
}
Expand Down

0 comments on commit 8a00502

Please sign in to comment.