-
-
Notifications
You must be signed in to change notification settings - Fork 4
43 lines (42 loc) · 1.16 KB
/
docker.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
name: Docker Build utils
on:
push:
branches:
- main
paths:
- common/build_utils/*
jobs:
docker:
strategy:
matrix:
include:
- base_image: alpine
tag_suffix: x86_64
extra_tags: latest x86_64
- base_image: i386/alpine
tag_suffix: i386
extra_tags: i386
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build Docker Image
id: build-image
uses: redhat-actions/buildah-build@v2
with:
image: sqsh-build
build-args: |
BASE_IMAGE=${{matrix.base_image}}
tags: >
sha-${{ github.sha }}-${{ matrix.tag_suffix }}
${{ github.ref_name }}-${{ matrix.tag_suffix }}
${{ matrix.extra_tags }}
context: common/build_utils
containerfiles: common/build_utils/Dockerfile
- name: Push to Dockerhub
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build-image.outputs.image }}
tags: ${{ steps.build-image.outputs.tags }}
registry: docker.io/gottox
username: gottox
password: ${{ secrets.DOCKER_TOKEN }}