Skip to content

Commit 9453d71

Browse files
committed
Merge branch 'release/v2.1.0'
2 parents 54487bb + 9e959c1 commit 9453d71

File tree

2 files changed

+15
-31
lines changed

2 files changed

+15
-31
lines changed

.github/workflows/build.yml

Lines changed: 9 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ jobs:
2525
path: ~/.gradle/caches
2626
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
2727
restore-keys: ${{ runner.os }}-gradle
28+
2829
- name: Build and analyze
2930
env:
3031
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
@@ -33,30 +34,13 @@ jobs:
3334
- uses: actions/upload-artifact@v2
3435
with:
3536
path: build/libs/*.jar
36-
deploy:
37-
runs-on: ubuntu-latest
38-
needs: build
39-
steps:
40-
- uses: actions/checkout@v2
41-
- uses: actions/setup-java@v1
42-
with:
43-
java-version: 11
44-
- name: Cache Gradle packages
45-
uses: actions/cache@v1
46-
with:
47-
path: ~/.gradle/caches
48-
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
49-
restore-keys: ${{ runner.os }}-gradle
37+
5038
- uses: docker/login-action@v1
5139
with:
52-
username: raeperd
53-
password: ${{ secrets.DOCKERHUB_TOKEN }}
54-
- name: Get branch name (merge)
55-
if: github.event_name != 'pull_request'
56-
shell: bash
57-
run: echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/} | tr / -)" >> $GITHUB_ENV
58-
- name: Get branch name (pull request)
59-
if: github.event_name == 'pull_request'
60-
shell: bash
61-
run: echo "BRANCH_NAME=$(echo ${GITHUB_HEAD_REF} | tr / -)" >> $GITHUB_ENV
62-
- run: ./gradlew jib -Djib.to.tags=${{ env.BRANCH_NAME }}
40+
registry: ghcr.io/raeperd
41+
username: ${{ github.actor }}
42+
password: ${{ secrets.GITHUB_TOKEN }}
43+
- name: Get branch name
44+
run: echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/} | tr /# -)" >> $GITHUB_ENV
45+
- name: Build container image
46+
run: ./gradlew jib -Djib.to.tags=${{ env.BRANCH_NAME }}

build.gradle

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
plugins {
2-
id 'org.springframework.boot' version '2.4.4'
2+
id 'org.springframework.boot' version '2.5.2'
33
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
44
id 'java'
55
id 'jacoco'
66
id "io.freefair.lombok" version "5.3.3.3"
77
id "org.ec4j.editorconfig" version "0.0.3"
88
id "org.sonarqube" version "3.1.1"
9-
id 'com.google.cloud.tools.jib' version '3.0.0'
9+
id 'com.google.cloud.tools.jib' version '3.1.4'
1010
}
1111

1212
group = 'io.github.raeperd'
13-
version = '2.0.0'
13+
version = '2.1.0'
1414
sourceCompatibility = '11'
1515

1616
repositories {
@@ -19,14 +19,14 @@ repositories {
1919

2020
dependencies {
2121
implementation 'org.springframework.boot:spring-boot-starter-web'
22-
implementation 'org.springframework.boot:spring-boot-starter-security:2.4.5'
22+
implementation 'org.springframework.boot:spring-boot-starter-security'
2323
implementation 'org.springframework.boot:spring-boot-starter-validation'
2424
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
2525

2626
runtimeOnly 'com.h2database:h2'
2727
testImplementation 'org.springframework.boot:spring-boot-starter-test'
2828
testImplementation 'org.springframework.security:spring-security-test'
29-
testImplementation 'org.mockito:mockito-inline:3.9.0'
29+
testImplementation 'org.mockito:mockito-inline:3.12.1'
3030
}
3131

3232
apply from: 'test.gradle'
@@ -58,7 +58,7 @@ jib {
5858
}
5959
}
6060
to {
61-
image = "raeperd/realworld-spring-boot-java"
61+
image = "ghcr.io/raeperd/${rootProject.name}"
6262
}
6363
container {
6464
ports = ["8080"]

0 commit comments

Comments
 (0)