Merge pull request #258 from Gottox/fix/container-needs-jq #40
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |