Skip to content

Publish All Channels #28

Publish All Channels

Publish All Channels #28

name: Publish All Channels
on:
workflow_dispatch:
workflow_run:
workflows: [Refresh Channels]
types:
- completed
push:
branches:
- main
paths:
- 'channels/**.json'
- 'Dockerfile'
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
publish-channel:
strategy:
matrix:
channel:
- tag: "5.5"
file: "sle-micro-5-5.json"
baseOS: "sle-micro"
- tag: "5.5-kvm"
file: "sle-micro-5-5-kvm.json"
baseOS: "sle-micro"
- tag: "5.5-rt"
file: "sle-micro-5-5-rt.json"
baseOS: "sle-micro"
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
build-args: |
CHANNEL_JSON_FILE=${{ matrix.channel.file }}
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/${{ matrix.channel.baseOS }}:${{ matrix.channel.tag }}