-
Notifications
You must be signed in to change notification settings - Fork 2
44 lines (37 loc) · 954 Bytes
/
build.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
37
38
39
40
41
42
43
44
name: Build and Push Image to Registry
on:
workflow_dispatch:
push:
branches:
- main
permissions:
contents: write
packages: write
env:
registry: ghcr.io
image_name: ${{ github.repository }}
jobs:
build:
name: Docker build and push
runs-on: ubuntu-latest
steps:
- name: Checkout project sources
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- name: Login to Github Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.registry }}
username: ${{ github.actor }}
password: ${{ github.token }}
- name: Build docker and push
id: build
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: ${{ env.registry }}/${{ github.repository }}:latest