-
Notifications
You must be signed in to change notification settings - Fork 0
88 lines (72 loc) · 2.5 KB
/
aaDeploy_arm.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Deploy AAesAmerican For ARM
on:
workflow_dispatch:
push:
branches: [ "master" ]
env:
TARGET_PLATFORMS: linux/arm64, linux/amd64
REGISTRY: asarco
IMAGE_NAME: AAesAmerican
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'adopt'
cache: maven
- name: Build package
run: mvn -B clean package -DskipTests -pl AAesAmerican,commons -Drevision=${{ env.NOW }}
- name: Get current date
id: date
run: |
echo "NOW=$(date +'%Y%m%dT%H%M%S')" >> $GITHUB_ENV
echo $NOW
- name: Login to Docker Hub
id: login-docker
uses: docker/login-action@v2
with:
username: asarco
password: ${{ secrets.DOCKERHUB_TOKEN }}
# Generate automatically tags <https://github.com/docker/metadata-action>
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
flavor: latest=auto
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=schedule,pattern={{date 'YYYYMMDDhmmss'}}
type=ref,event=branch
type=ref,event=tag
type=ref,event=pr
type=sha,enable=false
type=raw,{{date 'YYYYMMDDhmmss'}}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
# Build the images
- name: Build and push docker
uses: docker/build-push-action@v3
with:
context: ./AAesAmerican
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: ${{ env.TARGET_PLATFORMS }}
build-args: |
"consumerKey=${{ secrets.AA_OAUTH_CONSUMERKEY }}"
"consumerSecret=${{ secrets.AA_OAUTH_CONSUMERSECRET }}"
"accessToken=${{ secrets.AA_OAUTH_ACCESTOKEN }}"
"accessTokenSecret=${{ secrets.AA_OAUTH_ACCESSTOKENSECRET }}"