-
Notifications
You must be signed in to change notification settings - Fork 1
65 lines (60 loc) · 2.09 KB
/
build-tag-aarch64.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
58
59
60
61
62
63
64
65
name: main - aarch64
on:
workflow_dispatch: null
jobs:
build:
# push:
name: Build and Push image
runs-on: ubuntu-latest
# branches:
# - main
# pull_request:
if: '!contains(github.event.head_commit.message, ''[maven-release-plugin]'')'
# branches:
# - main
steps:
- name: Checkout project
uses: actions/checkout@v2
- name: Get the version
run: |
echo ::set-env name=TAG_NAME::$(cat projectFile | grep -Po '(?<=Version>).*(?=</Version>)')
- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-maven-
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: temurin
- name: Setup Maven settings.xml
uses: whelk-io/maven-settings-xml-action@v18
with:
servers: |
[
{
"id": "qiot-central",
"username": "${env.ARTIFACTORY_USERNAME_REF}",
"password": "${env.ARTIFACTORY_TOKEN_REF}"
},
{
"id": "qiot-snapshots",
"username": "${env.ARTIFACTORY_USERNAME_REF}",
"password": "${env.ARTIFACTORY_TOKEN_REF}"
}
]
- name: Build the Docker image
run: |
docker run --rm --privileged multiarch/qemu-user-static:register --reset
docker build -t quay.io/qiotproject/all-registration:${{ env.TAG_NAME }}-aarch64 -f src/main/docker/Dockerfile.native.multiarch .
- name: Push To Quay
id: push-to-quay
uses: redhat-actions/push-to-registry@v2
with:
registry: quay.io/qiotproject
image: edge-machinery
tag: ${{ env.TAG_NAME }}-aarch64
QUAY_USERNAME: ${{ secrets.QUAY_ALL_USERNAME }}
QUAY_PASSWORD: ${{ secrets.QUAY_ALL_PASSWORD }}