-
Notifications
You must be signed in to change notification settings - Fork 270
45 lines (45 loc) · 1.19 KB
/
image.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
name: image
on:
push:
tags:
- '*'
jobs:
build-image:
runs-on: ubuntu-latest
env:
EXTRA_TAGS:
steps:
- name: Configure envvars
run: |
GIT_TAG="${GITHUB_REF#refs/tags/}"
TAGS=$(
for repository in quay.io/jcmoraisjr jcmoraisjr; do
for project in haproxy-ingress; do
for tag in "$GIT_TAG" ${{ env.EXTRA_TAGS }}; do
echo -n "${repository}/${project}:${tag},"
done
done
done
)
echo "GIT_TAG=$GIT_TAG" >> $GITHUB_ENV
echo "TAGS=$TAGS" >> $GITHUB_ENV
- uses: actions/checkout@v3
- uses: docker/login-action@v2
with:
username: jcmoraisjr
password: ${{ secrets.DOCKERHUB_TOKEN }}
- uses: docker/login-action@v2
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_TOKEN }}
- uses: docker/setup-buildx-action@v2
- uses: docker/build-push-action@v4
with:
context: .
file: builder/Dockerfile
platforms: linux/amd64
push: true
build-args: |
GIT_TAG=${{ env.GIT_TAG }}
tags: ${{ env.TAGS }}