Skip to content

Building container - Fedora #185

Building container - Fedora

Building container - Fedora #185

name: build container - fedora
run-name: Building container - Fedora
on:
workflow_dispatch:
jobs:
build:
name: build-container-fedora
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 - fedora
run: |
podman build -t ghcr.io/gbraad-dotfiles/fedora:latest \
--build-arg=BASE_IMAGE="quay.io/fedora/fedora" \
--build-arg=BASE_VERSION=41 \
-f .devcontainer/fedora/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/fedora:latest \
ghcr.io/gbraad-dotfiles/fedora:41
podman tag ghcr.io/gbraad-dotfiles/fedora:latest \
ghcr.io/gbraad-dotfiles/fedora:${{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/fedora:latest
podman push ghcr.io/gbraad-dotfiles/fedora:41
podman push ghcr.io/gbraad-dotfiles/fedora:${{steps.get-tag.outputs.TAG}}