-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (33 loc) · 1.06 KB
/
docker_container.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
name: docker test on CONTAINER
on: workflow_dispatch
jobs:
dockertest:
runs-on: [self-hosted, linux, x64, CONTAINER]
steps:
- uses: actions/checkout@v4
- name: login to Github Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# https://github.com/docker/setup-buildx-action
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v3
# https://github.com/actions/setup-java
- uses: actions/setup-java@v4
with:
distribution: 'corretto'
java-version: '11'
cache: 'gradle'
architecture: x64
- name: build java
run: ./gradlew build --no-daemon --stacktrace
- name: build image
run: >-
docker buildx build
--build-arg JAR_FILE=build/libs/\*.jar
--file ./Dockerfile
--platform linux/amd64,linux/arm64
--tag ghcr.io/${GITHUB_REPOSITORY}:test
--push .