Skip to content

Building container - Ubuntu #68

Building container - Ubuntu

Building container - Ubuntu #68

name: build container - ubuntu
run-name: Building container - Ubuntu
on:
workflow_dispatch:
jobs:
build:
name: build-container-ubuntu
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 - ubuntu
run: |
podman build -t ghcr.io/gbraad-dotfiles/ubuntu:latest \
-f .devcontainer/ubuntu/Containerfile .
- name: Set release tag
id: get-tag
run: |
echo "TAG=$(date +'%y%m%d')" >> $GITHUB_OUTPUT
- name: Tag container
run: |
podman tag ghcr.io/gbraad-dotfiles/ubuntu:latest \
ghcr.io/gbraad-dotfiles/ubuntu:noble
podman tag ghcr.io/gbraad-dotfiles/ubuntu:latest \
ghcr.io/gbraad-dotfiles/ubuntu:${{steps.get-tag.outputs.TAG}}
- name: Login to registry
run: |
podman login ghcr.io -u ${{ github.actor }} \
-p ${{ secrets.GITHUB_TOKEN }}
- name: Push container to registry
run: |
podman push ghcr.io/gbraad-dotfiles/ubuntu:latest
podman push ghcr.io/gbraad-dotfiles/ubuntu:noble
podman push ghcr.io/gbraad-dotfiles/ubuntu:${{steps.get-tag.outputs.TAG}}