-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (43 loc) · 1.32 KB
/
java-maven-skaffold-build-push-docker.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# Builds
name: java-maven-skaffold-build-push-docker
on:
workflow_call:
inputs:
repositoryFolder:
description: "The code repository folder to build. '.' for the root folder, './folder1/mavenRoot/' for a sub-folder"
default: '.'
required: false
type: string
javaVersion:
description: 'The Java version to build and deploy. Default is Java17'
default: '17'
required: false
type: string
jobs:
build-push-skaffold:
runs-on: ubuntu-latest
#defaults:
# run:
# working-directory: ${{ inputs.repositoryFolder }}
steps:
- uses: actions/checkout@v3
- name: Set up JDK ${{ inputs.javaVersion }}
uses: actions/setup-java@v3
with:
java-version: ${{ inputs.javaVersion }}
distribution: "temurin"
cache: "maven"
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build image with Skaffold
uses: hiberbee/[email protected]
with:
skaffold-version: 2.1.0
working-directory: ${{ inputs.repositoryFolder }}
command: build
push: true
repository: kjetilh33
tag: "latest"