Skip to content

building all images #47

building all images

building all images #47

Workflow file for this run

---
name: Build and Push Containers
on:
push:
branches: [ "main" ]
paths:
- 'debian12-ssh/**'
- 'rocky93-ssh/**'
- 'ubuntu24-ssh/**'
- 'build.sh'
- '.github/workflows/build.yml'
pull_request:
branches: [ "main" ]
workflow_dispatch:
env:
REGISTRY_HOST: ghcr.io
REGISTRY_USER: ${{ github.actor }}
REGISTRY_REPO: testing-containers
# https://docs.github.com/en/actions/writing-workflows/choosing-where-your-workflow-runs/choosing-the-runner-for-a-job
jobs:
build-containers:
runs-on: ubuntu-22.04
permissions:
contents: read
packages: write
strategy:
matrix:
# Only building debian12-ssh in CI to reduce build time
# Add 'rocky93-ssh', 'ubuntu24-ssh' to build additional images
# container_type: [ 'debian12-ssh' ]
container_type: [ 'debian12-ssh', 'rocky93-ssh', 'ubuntu24-ssh' ]
fail-fast: false
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Podman
run: |
sudo apt-get update
sudo apt-get install -y podman
- name: Build and push container
env:
REGISTRY_HOST: ghcr.io
REGISTRY_USER: ${{ github.repository_owner }}
REGISTRY_REPO: testing-containers
CONTAINER_TYPE: ${{ matrix.container_type }}
CONTAINER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SSH_KEY: ${{ secrets.SSH_KEY }}
run: ./build.sh