Skip to content

openSUSE: Build and push toolbx images #34

openSUSE: Build and push toolbx images

openSUSE: Build and push toolbx images #34

Workflow file for this run

name: "openSUSE: Build and push toolbx images"
permissions: read-all
on:
push:
branches:
- main
paths:
- opensuse/**
- .github/workflows/opensuse.yaml
schedule:
- cron: '0 0 * * MON'
# Prevent multiple workflow runs from racing
concurrency: ${{ github.workflow }}
env:
distro: 'opensuse'
distro_pretty: 'openSUSE'
latest_release: 'tumbleweed'
jobs:
build-and-push-images:
strategy:
matrix:
release: ['tumbleweed']
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Quay.io
uses: docker/login-action@v2
with:
registry: quay.io
username: 'toolbx-images+github'
password: ${{ secrets.QUAY_ROBOT_TOKEN }}
- name: Build and push ${{ env.distro_pretty }} ${{ matrix.release }} toolbox image
uses: docker/build-push-action@v3
with:
context: ${{ env.distro }}/${{ matrix.release }}
file: ${{ env.distro }}/${{ matrix.release }}/Containerfile
platforms: linux/amd64,linux/arm64
push: true
no-cache: true
tags: quay.io/toolbx-images/${{ env.distro }}-toolbox:${{ matrix.release }}
- name: Push latest tag
if: env.latest_release == matrix.release
uses: docker/build-push-action@v3
with:
context: ${{ env.distro }}/${{ matrix.release }}
file: ${{ env.distro }}/${{ matrix.release }}/Containerfile
platforms: linux/amd64,linux/arm64
push: true
tags: quay.io/toolbx-images/${{ env.distro }}-toolbox:latest