Skip to content

building containers #43

building containers

building containers #43

name: build containers
run-name: building containers
on:
workflow_dispatch:
jobs:
build:
name: build-containers
permissions:
contents: read
packages: write
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Run podman build - base
run: |
podman build -t ghcr.io/gbraad-devenv/ubi/base:9 \
--build-arg=BASE_IMAGE="ghcr.io/gbraad-dotfiles/ubi9" \
--build-arg=BASE_VERSION="latest" \
-f containers/Containerfile-rebase .
- name: Run podman build - dotfiles
run: |
podman build -t ghcr.io/gbraad-devenv/ubi/dotfiles:9 \
--build-arg=BASE_IMAGE="ghcr.io/gbraad-devenv/ubi/base" \
--build-arg=BASE_VERSION=9 \
-f containers/Containerfile-dotfiles .
- name: Run podman build - systemd
run: |
podman build -t ghcr.io/gbraad-devenv/ubi/systemd:9 \
--build-arg=BASE_IMAGE="ghcr.io/gbraad-devenv/ubi/dotfiles" \
--build-arg=BASE_VERSION=9 \
-f containers/Containerfile-systemd .
- name: Login to ghcr.io
run: |
podman login ghcr.io -u ${{ github.actor }} \
-p ${{ secrets.GITHUB_TOKEN }}
- name: Push image to ghcr.io - dotfiles
run: |
podman push ghcr.io/gbraad-devenv/ubi/dotfiles:9
- name: Push image to ghcr.io - systemd
run: |
podman push ghcr.io/gbraad-devenv/ubi/systemd:9