Build standalone container image (experimental) #40
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 standalone container image (experimental) | |
on: | |
schedule: | |
- cron: "15 14 * * *" | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
workflow_dispatch: | |
env: | |
# Use docker.io for Docker Hub if empty | |
REGISTRY: ghcr.io | |
# github.repository as <account>/<repo> | |
IMAGE_NAME: ${{ github.repository }} | |
jobs: | |
build: | |
name: Build standalone container image | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/terrapkg/builder:f40 | |
options: --privileged --device=/dev/fuse | |
steps: | |
- name: Install dependencies | |
run: | | |
dnf5 install -y buildah podman skopeo fuse-overlayfs fuse3 | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
# - name: Login to ghcr.io | |
# uses: redhat-actions/podman-login@v1 | |
# with: | |
# registry: ghcr.io | |
# username: ${{ github.actor }} | |
# password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build container image | |
id: build-image | |
uses: redhat-actions/buildah-build@v2 | |
with: | |
containerfiles: | | |
base-standalone/Containerfile | |
image: ghcr.io/ultramarine-linux/base-standalone-bootc | |
tags: 41 latest | |
context: base-standalone | |
layers: true | |
extra-args: | | |
--security-opt=label=disable | |
--cap-add=all | |
--device=/dev/fuse | |
- name: Push To ghcr.io | |
uses: redhat-actions/push-to-registry@v2 | |
with: | |
image: base-standalone-bootc | |
tags: ${{ steps.build-image.outputs.tags }} | |
registry: ghcr.io/ultramarine-linux | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} |