Skip to content

Always reference build tags #8

Always reference build tags

Always reference build tags #8

name: Publish All Channels
on:
push:
branches:
- main
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
publish-channel:
strategy:
matrix:
channel:
- tag: "5.5"
file: "sle-micro-5-5.json"
flavor: "sle-micro"
- tag: "5.5-base"
file: "sle-micro-base-5-5.json"
flavor: "sle-micro"
- tag: "5.5-kvm"
file: "sle-micro-kvm-5-5.json"
flavor: "sle-micro"
- tag: "5.5-rt"
file: "sle-micro-rt-5-5.json"
flavor: "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.flavor }}:${{ matrix.channel.tag }}