-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (35 loc) · 1.01 KB
/
docker.yaml
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
name: Build and publish Docker image
on:
push:
branches: ["main", "feature/pipeline"]
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'temurin'
- name: Set up Maven
uses: stCarolas/setup-maven@v4
with:
maven-version: '3.8.6'
- name: Build with maven
run: mvn clean package -DskipTests
- name: Login to Github container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: |
ghcr.io/stevensblueprint/orservice:${{ github.sha }}
ghcr.io/stevensblueprint/orservice:latest