Skip to content

building containers #12

building containers

building containers #12

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 - rebase
run: |
podman build -t ghcr.io/gbraad-devenv/centos/rebase:stream9 \
--build-arg=BASE_IMAGE="ghcr.io/gbraad-dotfiles/centos" \
--build-arg=BASE_VERSION="stream9" \
-f containers/Containerfile-rebase .
- name: Run podman build - dotfiles
run: |
podman build -t ghcr.io/gbraad-devenv/centos/dotfiles:stream9 \
--build-arg=BASE_IMAGE="ghcr.io/gbraad-devenv/centos/rebase" \
--build-arg=BASE_VERSION="stream9" \
-f containers/Containerfile-dotfiles .
- name: Run podman build - systemd
run: |
podman build -t ghcr.io/gbraad-devenv/centos/systemd:stream9 \
--build-arg=BASE_IMAGE="ghcr.io/gbraad-devenv/centos/dotfiles" \
--build-arg=BASE_VERSION="stream9" \
-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 - rebase
run: |
podman push ghcr.io/gbraad-devenv/centos/rebase:stream9
- name: Push image to ghcr.io - dotfiles
run: |
podman push ghcr.io/gbraad-devenv/centos/dotfiles:stream9
- name: Push image to ghcr.io - systemd
run: |
podman push ghcr.io/gbraad-devenv/centos/systemd:stream9