Skip to content

Commit

Permalink
ci: Build & Publish Fedora Toolbx images with GitHub Packages
Browse files Browse the repository at this point in the history
For the sake of greater control over the testing of images and for having an
infrustructure for hosting images that are not endorsed by the distirbutions.
  • Loading branch information
HarryMichal committed Jan 9, 2022
1 parent 4dd3c89 commit 9896f59
Showing 1 changed file with 58 additions and 0 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/image-factory.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Image Factory
on:
schedule:
- cron: "0 0 * * *"

env:
IMAGE_REGISTRY: ghcr.io
REGISTRY_USER: ${{ github.actor }}
REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }}

jobs:
fedora-images:
name: Build & Push Toolbx images
runs-on: ubuntu-latest
strategy:
matrix:
pool:
- image: fedora-toolbox-36
version: 36
dir: fedora/f36

- image: fedora-toolbox-35
version: 35
dir: fedora/f35

- image: fedora-toolbox-34
version: 34
dir: fedora/f34

steps:
- uses: actions/checkout@v2

- name: Login to Registry
uses: redhat-actions/podman-login@v1
with:
username: ${{ env.REGISTRY_USER }}
password: ${{ env.REGISTRY_PASSWORD }}
registry: ${{ env.IMAGE_REGISTRY }}

- name: Build Image
id: build-image
uses: redhat-actions/buildah-build@v2
with:
containerfiles: ./Containerfile
context: ./images/${{ matrix.pool.dir }}
image: ${{ matrix.pool.image }}
oci: true
tags: ${{ matrix.pool.version }}

# TODO: Testing of newly-created images

- name: Push Image
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build-image.outputs.image }}
tags: ${{ steps.build-image.outputs.tags }}
registry: ${{ env.IMAGE_REGISTRY }}

0 comments on commit 9896f59

Please sign in to comment.