Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Build & Publish Fedora Toolbx images with GitHub Packages #973

Merged
merged 1 commit into from
Jan 9, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/${{ github.repository_owner }}
REGISTRY_USER: ${{ github.actor }}
REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }}

jobs:
build-push-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 }}