-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (51 loc) · 1.93 KB
/
main.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Native-AMD64
on:
push:
tags:
- "v*"
jobs:
build:
runs-on: ubuntu-latest
steps:
#Login to DockerHub
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: dashaun
password: ${{ secrets.DOCKERHUB_TOKEN }}
- uses: actions/setup-java@v2
with:
distribution: 'liberica' # See 'Supported distributions' for available options
java-version: '21'
- name: Checkout master
uses: actions/checkout@v3
with:
submodules: true
#Build Image
- name: Build Image
run: ./mvnw -Pnative spring-boot:build-image
#Deploy the image to the Docker registry
- name: Push Images to Docker Registry
run: docker push -a dashaun/com.javagrunt.service.gateway
manifest:
needs: build
runs-on: ubuntu-latest
steps:
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: dashaun
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: pull-arm64
uses: nick-fields/retry@v2
with:
timeout_minutes: 5
retry_wait_seconds: 60
max_attempts: 6
command: docker pull dashaun/com.javagrunt.service.gateway:$GITHUB_REF_NAME-aarch_64
- name: create-manifest
run: |
docker manifest create dashaun/com.javagrunt.service.gateway:$GITHUB_REF_NAME --amend dashaun/com.javagrunt.service.gateway:$GITHUB_REF_NAME-x86_64 --amend dashaun/com.javagrunt.service.gateway:$GITHUB_REF_NAME-aarch_64
docker manifest push dashaun/com.javagrunt.service.gateway:$GITHUB_REF_NAME
docker manifest create dashaun/com.javagrunt.service.gateway:latest --amend dashaun/com.javagrunt.service.gateway:$GITHUB_REF_NAME-x86_64 --amend dashaun/com.javagrunt.service.gateway:$GITHUB_REF_NAME-aarch_64
docker manifest push dashaun/com.javagrunt.service.gateway:latest