Skip to content

building containers #32

building containers

building containers #32

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