-
Notifications
You must be signed in to change notification settings - Fork 0
105 lines (101 loc) · 3.9 KB
/
baseimage.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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name: Deploy Baseimage
# Will only run on pushes to the docker directory, to prevent a rebuild of the base image on every change.
# We also only build on develop, so that the latest base image is always valid. If you want to verify with an snapshot image, please push one
# to your local registry and build from there.
on:
push:
branches:
- master
workflow_dispatch:
env:
IMAGE_NAME: fiware/iotagent-isoxml:latest
jobs:
deploy:
runs-on: ubuntu-18.04
if: ${{ github.repository_owner == 'FIWARE' }}
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 DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to quay.io
uses: docker/login-action@v1
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker meta (PM2)
id: meta-pm2
uses: docker/metadata-action@v3
with:
# list of Docker images to use as base name for tags
images: |
${{ env.IMAGE_NAME }}-pm2
# generate Docker tags based on the following events/attributes
labels: |
org.opencontainers.image.title=IoT Agent for the ISOXML/ADAPT protocol with PM2
org.opencontainers.image.description=IoT Agent for the ISOXML/ADAPT protocol for agricultural machinery (over an HTTP transport)
- name: Build and push (PM2)
uses: docker/build-push-action@v3
with:
push: true
tags: |
${{ env.IMAGE_NAME }}-pm2
ghcr.io/${{ env.IMAGE_NAME }}-pm2
quay.io/${{ env.IMAGE_NAME }}-pm2
file: docker/Dockerfile
target: pm2
labels: ${{ steps.meta-pm2.outputs.labels }}
- name: Docker meta (Distroless)
id: meta-distroless
uses: docker/metadata-action@v3
with:
# list of Docker images to use as base name for tags
images: |
${{ env.IMAGE_NAME }}-distroless
labels: |
org.opencontainers.image.title=IoT Agent for the ISOXML/ADAPT protocol (Distroless)
org.opencontainers.image.description=IoT Agent for the ISOXML/ADAPT protocol for agricultural machinery (over an HTTP transport)
- name: Build and push (Distroless)
uses: docker/build-push-action@v3
with:
push: true
tags: |
${{ env.IMAGE_NAME }}-distroless
ghcr.io/${{ env.IMAGE_NAME }}-distroless
quay.io/${{ env.IMAGE_NAME }}-distroless
file: docker/Dockerfile
target: distroless
labels: ${{ steps.meta-distroless.outputs.labels }}
- name: Docker meta (Slim)
id: meta
uses: docker/metadata-action@v3
with:
# list of Docker images to use as base name for tags
images: |
${{ env.IMAGE_NAME }}
labels: |
org.opencontainers.image.title=IoT Agent for the ISOXML/ADAPT protocol with PM2
org.opencontainers.image.description=IoT Agent for the ISOXML/ADAPT protocol for agricultural machinery (over an HTTP transport)
- name: Build and push (Slim)
uses: docker/build-push-action@v3
with:
push: true
tags: |
${{ env.IMAGE_NAME }}
ghcr.io/${{ env.IMAGE_NAME }}
quay.io/${{ env.IMAGE_NAME }}
file: docker/Dockerfile
labels: ${{ steps.meta.outputs.labels }}