Building container - CentOS #117
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build container - centos | |
run-name: Building container - CentOS | |
on: | |
workflow_dispatch: | |
jobs: | |
build: | |
name: build-container-centos | |
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 - centos | |
run: | | |
podman build -t ghcr.io/gbraad-dotfiles/centos:latest \ | |
--build-arg=BASE_IMAGE="quay.io/centos/centos" \ | |
--build-arg=BASE_VERSION="stream9" \ | |
-f .devcontainer/centos/Containerfile . | |
- name: Tag and push image to ghcr.io - centos | |
run: | | |
DATE=$(date +"%y%m%d") | |
podman tag ghcr.io/gbraad-dotfiles/centos:latest \ | |
ghcr.io/gbraad-dotfiles/centos:stream9 | |
podman tag ghcr.io/gbraad-dotfiles/centos:latest \ | |
ghcr.io/gbraad-dotfiles/centos:${DATE} | |
podman login ghcr.io -u ${{ github.actor }} \ | |
-p ${{ secrets.GITHUB_TOKEN }} | |
podman push ghcr.io/gbraad-dotfiles/centos:${DATE} | |
podman push ghcr.io/gbraad-dotfiles/centos:stream9 | |
podman push ghcr.io/gbraad-dotfiles/centos:latest | |