Skip to content

opensuse-leap-dist

opensuse-leap-dist #11

Workflow file for this run

name: opensuse-leap-dist
on:
push:
branches: [ main ]
paths:
- '.github/workflows/opensuse-leap.yml'
- '!opensuse/leap/**'
workflow_dispatch:
repository_dispatch:
types: opensuse-leap-build
jobs:
build:
name: Building opensuse leap docker images
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
dist:
- {
name: opensuse-leap-15.5,
os: opensuse-leap,
symbol: "15.5",
platforms: "linux/amd64,linux/arm64/v8,linux/arm/v7"
}
- {
name: opensuse-leap-15.6,
os: opensuse-leap,
symbol: "15.6",
platforms: "linux/amd64,linux/arm64/v8,linux/arm/v7"
}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Prepare
id: prepare
run: |
DIST_NAME=${{ matrix.dist.name }}
USER_NAME=flameshotorg
REPO_NAME=ci-building-images
IMAGE_NAME=opensuse/leap/${{ matrix.dist.symbol }}
TAGS="${USER_NAME}/${REPO_NAME}:${DIST_NAME}"
echo "build_args=VERSION=${DIST_NAME}" >> $GITHUB_OUTPUT
echo "image-name=${IMAGE_NAME}" >> $GITHUB_OUTPUT
echo "tags=${TAGS}" >> $GITHUB_OUTPUT
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build
uses: docker/build-push-action@v6
with:
context: ./${{ steps.prepare.outputs.image-name }}
file: ./${{ steps.prepare.outputs.image-name }}/Dockerfile
platforms: ${{ matrix.dist.platforms }}
push: ${{ github.event_name != 'pull_request' }}
build-args: ${{ steps.prepare.outputs.build_args }}
tags: ${{ steps.prepare.outputs.tags }}
env:
DOCKER_BUILD_SUMMARY: false
DOCKER_BUILD_RECORD_UPLOAD: false
- name: Clear
if: always()
run: |
rm -rf ${HOME}/.docker/config.json