Skip to content

Commit

Permalink
Cleanup and setup workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jmarrero committed Oct 3, 2023
1 parent 46c345f commit 937e11e
Show file tree
Hide file tree
Showing 3 changed files with 89 additions and 10 deletions.
67 changes: 67 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@

name: Build
on:
schedule:
- cron: "21 21 * * *"
push:
branches: ["main"]

env:
REGISTRY: ghcr.io
IMAGE_NAME: "jmarrero-silverblue"
IMAGE_REGISTRY: ghcr.io/${{ github.repository_owner }}
REGISTRY_USER: ${{ github.actor }}
REGISTRY_PASSWORD: ${{ github.token }}


jobs:
podman-build:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3

- name: Build container image
uses: redhat-actions/buildah-build@v2
with:
context: "."
containerfiles: Dockerfile
image: ${{ env.IMAGE_NAME }}
layers: false
oci: true

- name: Push to ghcr.io
uses: redhat-actions/push-to-registry@v2.6
with:
image: ${{ env.IMAGE_NAME }}
tags: "latest"
registry: ${{ env.IMAGE_REGISTRY }}
username: ${{ env.REGISTRY_USER }}
password: ${{ env.REGISTRY_PASSWORD }}
extra-args: |
--disable-content-trust
# docker-buildx:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout code
# uses: actions/checkout@v3

# - name: Set up Docker Buildx
# id: buildx
# uses: docker/setup-buildx-action@v2

# - name: Login to dhcr.io
# uses: docker/login-action@v2
# with:
# registry: ghcr.io
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}

# - name: Build container image and push to ghcr.io
# uses: docker/build-push-action@v3
# with:
# context: .
# tags: |
# "${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_NAME }}:docker-latest"
# push: ${{ github.ref == 'refs/heads/main' }}
19 changes: 9 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
FROM ghcr.io/cgwalters/fedora-silverblue:37
#Add vscode repo
RUN echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/code.repo
FROM quay.io/fedora/fedora-silverblue:39
RUN rpm-ostree install \
# sign git tags for releases
git-evtag \
Expand All @@ -9,15 +7,16 @@ RUN rpm-ostree install \
# kerberos auth
krb5-workstation \
# run local qemu vms
libvirt-daemon-config-network libvirt-daemon-kvm qemu-kvm util-linux-user \
libvirt-daemon-config-network libvirt-daemon-kvm qemu-kvm \
virt-install virt-manager virt-viewer \
# dev tools
make xsel \
make xsel strace \
# preffered tools
zsh neofetch \
neofetch gnome-tweak-tool util-linux-user fish gnome-console \
# logitech mouse/keyboard pairing
solaar \
# third party
code \
# rpm-ostree cleanup and verification stage
&& rpm-ostree cleanup -m && ostree container commit
# remove gnome-terminal
&& rpm-ostree override remove gnome-terminal-nautilus gnome-terminal \
# cleanup and verification stage
&& rm -rf /var/lib/unbound \
&& ostree container commit
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
This is my current silverblue setup using OSTree Native Container.

This builds the ./Dockerfile with podman.

They are pushed to:
`ghcr.io/jmarrero/jmarrero-silverblue:latest`

The base image I use currently comes from:
https://github.com/cgwalters/sync-fedora-ostree-containers

There are examples, replacing packages, installing kernel modules and much more at:
https://github.com/coreos/layering-examples
CoreOS layering examples should work with Silverblue by changing the base image.

0 comments on commit 937e11e

Please sign in to comment.