Skip to content

Build and publish container #121

Build and publish container

Build and publish container #121

Workflow file for this run

name: Build and publish container
on:
workflow_dispatch:
push:
branches: [main]
schedule:
- cron: "20 16 */7 * *"
env:
REGISTRY: ghcr.io/${{ github.repository_owner }}
IMAGE_NAME: toolbox-fedora
FEDORA_VERSION: 41
jobs:
build:
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- name: Free Disk Space
uses: jlumbroso/free-disk-space@main
with:
tool-cache: true
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: true
- uses: actions/checkout@v4
- uses: redhat-actions/buildah-build@v2
id: build-image
with:
image: ${{ env.IMAGE_NAME }}
tags: latest ${{ env.FEDORA_VERSION }} ${{ github.sha }}
containerfiles: |
./Containerfile
build-args: |
FEDORA_VERSION=${{ env.FEDORA_VERSION }}
- uses: redhat-actions/podman-login@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build-image.outputs.image }}
tags: ${{ steps.build-image.outputs.tags }}
registry: ${{ env.REGISTRY }}