1
1
#
2
- # This source file is part of the Apodini Template open source project
2
+ # This source file is part of the JASS 2021 open source project
3
3
#
4
4
# SPDX-FileCopyrightText: 2021 Paul Schmiedmayer and the project authors (see CONTRIBUTORS.md) <paul.schmiedmayer@tum.de>
5
5
#
14
14
workflow_dispatch :
15
15
16
16
jobs :
17
- docker :
18
- name : Docker Build and Push Image ${{ matrix.architecture }}
19
- runs-on : ubuntu-latest
17
+ dockerARM64 :
18
+ name : Docker Build and Push Image ARM64
19
+ runs-on : ARM64
20
20
steps :
21
21
- name : Checkout repository
22
22
uses : actions/checkout@v2
@@ -25,14 +25,33 @@ jobs:
25
25
uses : WyriHaximus/github-action-get-previous-tag@v1
26
26
with :
27
27
fallback : latest
28
- - name : Set up QEMU
29
- uses : docker/setup-qemu-action@v1
28
+ - name : Log in to the container registry
29
+ uses : docker/login-action@v1
30
+ with :
31
+ registry : ghcr.io
32
+ username : ${{ github.actor }}
33
+ password : ${{ secrets.GITHUB_TOKEN }}
34
+ - name : Build and push docker image
35
+ id : buildandpush
36
+ uses : docker/build-push-action@v2
30
37
with :
31
- platforms : linux/arm64
32
- - name : Set up docker buildx
33
- uses : docker/setup-buildx-action@v1
38
+ context : .
39
+ file : ./Dockerfile
40
+ build-args : |
41
+ baseimage=swiftarm/swift:5.5.1-ubuntu-focal
42
+ push : true
43
+ tags : ghcr.io/jass-2021/jass2021-webservice:latest-arm64,ghcr.io/jass-2021/jass2021-webservice:${{ steps.latesttag.outputs.tag }}-arm64
44
+ dockerAMD64 :
45
+ name : Docker Build and Push Image AMD64
46
+ runs-on : ubuntu-latest
47
+ steps :
48
+ - name : Checkout repository
49
+ uses : actions/checkout@v2
50
+ - name : Get latest tag
51
+ id : latesttag
52
+ uses : WyriHaximus/github-action-get-previous-tag@v1
34
53
with :
35
- install : true
54
+ fallback : latest
36
55
- name : Log in to the container registry
37
56
uses : docker/login-action@v1
38
57
with :
@@ -45,93 +64,35 @@ jobs:
45
64
with :
46
65
context : .
47
66
file : ./Dockerfile
67
+ build-args : |
68
+ baseimage=swift:focal
48
69
push : true
49
- platforms : linux/arm64
50
- tags : ghcr.io/jass-2021/jass2021-webservice:latest
51
- - name : Image digest
52
- run : echo ${{ steps.buildandpush.outputs.digest }}
53
-
54
- # name: Build Docker Image
55
- #
56
- # on:
57
- # release:
58
- # types: [published]
59
- # workflow_dispatch:
60
- #
61
- # jobs:
62
- # docker:
63
- # name: Docker Build and Push Image ${{ matrix.architecture }}
64
- # runs-on: ubuntu-latest
65
- # strategy:
66
- # matrix:
67
- # architecture: [arm64, amd64]
68
- # steps:
69
- # - name: Checkout repository
70
- # uses: actions/checkout@v2
71
- # - name: Get latest tag
72
- # id: latesttag
73
- # uses: WyriHaximus/github-action-get-previous-tag@v1
74
- # with:
75
- # fallback: latest
76
- # - name: Set up QEMU
77
- # uses: docker/setup-qemu-action@v1
78
- # with:
79
- # platforms: linux/${{ matrix.architecture }}
80
- # - name: Set up docker buildx
81
- # uses: docker/setup-buildx-action@v1
82
- # with:
83
- # install: true
84
- # - name: Log in to the container registry
85
- # uses: docker/login-action@v1
86
- # with:
87
- # registry: ghcr.io
88
- # username: ${{ github.actor }}
89
- # password: ${{ secrets.GITHUB_TOKEN }}
90
- # - name: Determine Base Image
91
- # uses: haya14busa/action-cond@v1
92
- # id: baseimage
93
- # with:
94
- # cond: ${{ matrix.architecture == 'arm64' }}
95
- # if_true: 'swiftarm/swift:5.5.1-ubuntu-focal'
96
- # if_false: 'swift:focal'
97
- # - name: Build and push docker image
98
- # id: buildandpush
99
- # uses: docker/build-push-action@v2
100
- # with:
101
- # context: .
102
- # file: ./Dockerfile
103
- # build-args: |
104
- # baseimage=${{ steps.baseimage.outputs.value }}
105
- # push: true
106
- # platforms: linux/${{ matrix.architecture }}
107
- # tags: ghcr.io/jass-2021/jass2021-webservice:latest-${{ matrix.architecture }},ghcr.io/jass-2021/jass2021-webservice:${{ steps.latesttag.outputs.tag }}-${{ matrix.architecture }}
108
- # - name: Image digest
109
- # run: echo ${{ steps.buildandpush.outputs.digest }}
110
- # dockermanifest:
111
- # needs: [docker]
112
- # name: Create Multi-CPU Architecture Image
113
- # runs-on: ubuntu-latest
114
- # steps:
115
- # - name: Checkout repository
116
- # uses: actions/checkout@v2
117
- # - name: Get latest tag
118
- # id: latesttag
119
- # uses: WyriHaximus/github-action-get-previous-tag@v1
120
- # with:
121
- # fallback: latest
122
- # - name: Log in to the container registry
123
- # uses: docker/login-action@v1
124
- # with:
125
- # registry: ghcr.io
126
- # username: ${{ github.actor }}
127
- # password: ${{ secrets.GITHUB_TOKEN }}
128
- # - name: Create and Push Multi Architecture Image
129
- # run: |
130
- # docker manifest create ghcr.io/jass-2021/jass2021-webservice:latest \
131
- # --amend ghcr.io/jass-2021/jass2021-webservice:latest-amd64 \
132
- # --amend ghcr.io/jass-2021/jass2021-webservice:latest-arm64
133
- # docker manifest create ghcr.io/jass-2021/jass2021-webservice:${{ steps.latesttag.outputs.tag }} \
134
- # --amend ghcr.io/jass-2021/jass2021-webservice:${{ steps.latesttag.outputs.tag }}-amd64 \
135
- # --amend ghcr.io/jass-2021/jass2021-webservice:${{ steps.latesttag.outputs.tag }}-arm64
136
- # docker manifest push ghcr.io/jass-2021/jass2021-webservice:latest
137
- # docker manifest push ghcr.io/jass-2021/jass2021-webservice:${{ steps.latesttag.outputs.tag }}
70
+ tags : ghcr.io/jass-2021/jass2021-webservice:latest-amd64,ghcr.io/jass-2021/jass2021-webservice:${{ steps.latesttag.outputs.tag }}-amd64
71
+ dockermanifest :
72
+ needs : [dockerARM64, dockerAMD64]
73
+ name : Create Multi-CPU Architecture Image
74
+ runs-on : ubuntu-latest
75
+ steps :
76
+ - name : Checkout repository
77
+ uses : actions/checkout@v2
78
+ - name : Get latest tag
79
+ id : latesttag
80
+ uses : WyriHaximus/github-action-get-previous-tag@v1
81
+ with :
82
+ fallback : latest
83
+ - name : Log in to the container registry
84
+ uses : docker/login-action@v1
85
+ with :
86
+ registry : ghcr.io
87
+ username : ${{ github.actor }}
88
+ password : ${{ secrets.GITHUB_TOKEN }}
89
+ - name : Create and Push Multi Architecture Image
90
+ run : |
91
+ docker manifest create ghcr.io/jass-2021/jass2021-webservice:latest \
92
+ --amend ghcr.io/jass-2021/jass2021-webservice:latest-amd64 \
93
+ --amend ghcr.io/jass-2021/jass2021-webservice:latest-arm64
94
+ docker manifest create ghcr.io/jass-2021/jass2021-webservice:${{ steps.latesttag.outputs.tag }} \
95
+ --amend ghcr.io/jass-2021/jass2021-webservice:${{ steps.latesttag.outputs.tag }}-amd64 \
96
+ --amend ghcr.io/jass-2021/jass2021-webservice:${{ steps.latesttag.outputs.tag }}-arm64
97
+ docker manifest push ghcr.io/jass-2021/jass2021-webservice:latest
98
+ docker manifest push ghcr.io/jass-2021/jass2021-webservice:${{ steps.latesttag.outputs.tag }}
0 commit comments