Workflow file for this run
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: Release Mondoo Container Image | |
on: | |
release: | |
types: [released] | |
workflow_dispatch: | |
jobs: | |
build_container: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
name: Build Docker | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Get Latest Tag | |
id: vars | |
uses: WyriHaximus/github-action-get-previous-tag@v1 | |
- name: Parse semver string | |
id: semver | |
uses: booxmedialtd/ws-action-parse-semver@v1 | |
with: | |
input_string: ${{ steps.vars.outputs.tag }} | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
with: | |
image: tonistiigi/binfmt:latest | |
platforms: arm64,arm | |
- name: Set up Docker BuildX | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to DockerHub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Build and push root images | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
platforms: linux/amd64,linux/arm64,linux/arm/v6,linux/arm/v7 | |
push: true | |
build-args: VERSION=${{ steps.vars.outputs.tag }} | |
target: root | |
tags: | | |
mondoolabs/mondoo:${{ steps.vars.outputs.tag }} | |
mondoolabs/mondoo:${{ steps.semver.outputs.major }} | |
mondoolabs/mondoo:latest | |
mondoo/client:${{ steps.vars.outputs.tag }} | |
mondoo/client:${{ steps.semver.outputs.major }} | |
mondoo/client:latest | |
- name: Build and push rootless images | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
platforms: linux/amd64,linux/arm64,linux/arm/v6,linux/arm/v7 | |
push: true | |
build-args: VERSION=${{ steps.vars.outputs.tag }} | |
target: rootless | |
tags: | | |
mondoo/client:${{ steps.vars.outputs.tag }}-rootless | |
mondoo/client:${{ steps.semver.outputs.major }}-rootless | |
mondoo/client:latest-rootless | |
- name: Build and push root images (ubi) | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
file: Dockerfile-ubi | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
build-args: VERSION=${{ steps.vars.outputs.tag }} | |
target: root | |
tags: | | |
mondoo/client:${{ steps.vars.outputs.tag }}-ubi | |
mondoo/client:${{ steps.semver.outputs.major }}-ubi | |
mondoo/client:latest-ubi | |
- name: Build and push rootless images (ubi) | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
file: Dockerfile-ubi | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
build-args: VERSION=${{ steps.vars.outputs.tag }} | |
target: rootless | |
tags: | | |
mondoo/client:${{ steps.vars.outputs.tag }}-ubi-rootless | |
mondoo/client:${{ steps.semver.outputs.major }}-ubi-rootless | |
mondoo/client:latest-ubi-rootless | |