-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
89 additions
and
10 deletions.
There are no files selected for viewing
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
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' }} |
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
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
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. |