-
Notifications
You must be signed in to change notification settings - Fork 9
72 lines (68 loc) · 1.99 KB
/
generate-images.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
name: Generate Images
on:
push:
branches:
- main
workflow_dispatch:
env:
REGISTRY: ghcr.io
ORG: fabric8-analytics
REPO: crda-images
jobs:
Build-images:
runs-on: ubuntu-latest
strategy:
matrix:
versions:
- ecosystem: python
package: python3
target: crda-python
tag: 3.7
path: Dockerfiles/Dockerfile.python
- ecosystem: python
package: python36
target: crda-python
tag: 3.6
path: Dockerfiles/Dockerfile.python
- ecosystem: python
package: python38
target: crda-python
tag: 3.8
path: Dockerfiles/Dockerfile.python
- ecosystem: golang
package: golang
target: crda-golang
tag: 1.16.5
path: Dockerfiles/Dockerfile.golang
- ecosystem: npm
package: npm
target: crda-npm
tag: 16.3.0
path: Dockerfiles/Dockerfile.npm
- ecosystem: maven
package: maven
target: crda-maven
tag: 3.8.1
path: Dockerfiles/Dockerfile.maven
steps:
- uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.repository_owner }}
password: ${{ secrets.CR_PAT }}
- name: Build and push ${{ matrix.versions.ecosystem }}-${{ matrix.versions.package }}
id: docker_build
uses: docker/build-push-action@v2
with:
context: .
file: ./${{ matrix.versions.path }}
push: true
tags: ${{ env.REGISTRY }}/${{ env.ORG }}/${{ matrix.versions.target }}:${{ matrix.versions.tag }}
build-args: ECOSYSTEM_VERSION=${{ matrix.versions.package}}