forked from konveyor/analyzer-lsp
-
Notifications
You must be signed in to change notification settings - Fork 0
116 lines (109 loc) · 4.21 KB
/
image-build.yaml
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
name: Multiple Architecture Image Build
on:
workflow_dispatch:
push:
branches:
- 'main'
- 'release-*'
tags:
- 'v*'
concurrency:
group: build-${{ github.ref }}
cancel-in-progress: true
jobs:
image-build:
strategy:
fail-fast: false
matrix:
images:
- name: analyzer-lsp
containerfile: "./Dockerfile"
pre_build_cmd: |
TAG=${GITHUB_REF_NAME/main/latest}
sed -i "s,FROM quay.io/konveyor/jdtls-server-base,FROM quay.io/konveyor/jdtls-server-base:${TAG}," Dockerfile
context: "."
architectures: '[ "amd64", "arm64", "ppc64le", "s390x" ]'
- name: dotnet-external-provider
containerfile: "./external-providers/dotnet-external-provider/Dockerfile"
context: "."
architectures: '[ "amd64", "arm64" ]'
- name: golang-dependency-provider
containerfile: "./external-providers/golang-dependency-provider/Dockerfile"
context: "."
architectures: '[ "amd64", "arm64" ]'
- name: yq-external-provider
containerfile: "./external-providers/yq-external-provider/Dockerfile"
context: "."
architectures: '[ "amd64", "arm64" ]'
- name: java-external-provider
containerfile: "./external-providers/java-external-provider/Dockerfile"
context: "."
architectures: '[ "amd64", "arm64" ]'
pre_build_cmd: |
TAG=${GITHUB_REF_NAME/main/latest}
sed -i "s,FROM quay.io/konveyor/jdtls-server-base,FROM quay.io/konveyor/jdtls-server-base:${TAG}," Dockerfile
uses: konveyor/release-tools/.github/workflows/build-push-images.yaml@main
with:
registry: "quay.io/konveyor"
image_name: ${{ matrix.images.name }}
containerfile: ${{ matrix.images.containerfile }}
pre_build_cmd: ${{ matrix.images.pre_build_cmd }}
architectures: ${{ matrix.images.architectures }}
context: ${{ matrix.images.context }}
secrets:
registry_username: ${{ secrets.QUAY_PUBLISH_ROBOT }}
registry_password: ${{ secrets.QUAY_PUBLISH_TOKEN }}
# generic provider requires go dep provider we built in matrix and needs to be sequential
generic-external-provider-build:
needs: image-build
uses: konveyor/release-tools/.github/workflows/build-push-images.yaml@main
with:
registry: "quay.io/konveyor"
image_name: generic-external-provider
containerfile: "./external-providers/generic-external-provider/Dockerfile"
architectures: '[ "amd64", "arm64" ]'
context: "."
pre_build_cmd: |
TAG=${GITHUB_REF_NAME/main/latest}
sed -i "s,FROM quay.io/konveyor/golang-dependency-provider,FROM quay.io/konveyor/golang-dependency-provider:${TAG}," Dockerfile
secrets:
registry_username: ${{ secrets.QUAY_PUBLISH_ROBOT }}
registry_password: ${{ secrets.QUAY_PUBLISH_TOKEN }}
analyzer-windows-build:
needs: image-build
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
registry: "quay.io/konveyor"
username: ${{ secrets.QUAY_PUBLISH_ROBOT }}
password: ${{ secrets.QUAY_PUBLISH_TOKEN }}
- name: Docker Build
shell: bash
run: |
TAG=${GITHUB_REF_NAME/main/latest}
IMAGE_NAME=quay.io/konveyor/analyzer-lsp:${TAG}-ltsc2022
docker build -t ${IMAGE_NAME} -f ./Dockerfile.windows .
docker push ${IMAGE_NAME}
dotnet-windows-build:
needs: image-build
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
registry: "quay.io/konveyor"
username: ${{ secrets.QUAY_PUBLISH_ROBOT }}
password: ${{ secrets.QUAY_PUBLISH_TOKEN }}
- name: Docker Build
shell: bash
run: |
TAG=${GITHUB_REF_NAME/main/latest}
IMAGE_NAME=quay.io/konveyor/dotnet-external-provider:${TAG}-ltsc2022
docker build -t ${IMAGE_NAME} -f ./external-providers/dotnet-external-provider/Dockerfile.windows .
docker push ${IMAGE_NAME}