Skip to content

Commit

Permalink
Add workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
dominikholler committed Feb 25, 2024
1 parent d438e9a commit e7d240c
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Build container image
on:
pull_request:

env:
IMAGE_NAME: ${{ github.event.repository.name }}
IMAGE_TAGS: ${{ github.sha }}

jobs:
push-quay:
name: Build container image
runs-on: ubuntu-22.04

steps:
- name: Checkout Push to Registry action
uses: actions/checkout@v2

- name: Install qemu dependency
run: |
sudo apt-get update
sudo apt-get install -y qemu-user-static
- name: Build Image
id: build_image
uses: redhat-actions/buildah-build@v2
with:
image: ${{ env.IMAGE_NAME }}
tags: ${{ env.IMAGE_TAGS }}
archs: amd64, arm64
containerfiles: |
./Dockerfile
42 changes: 42 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Build container image
on:
release:

env:
IMAGE_NAME: ${{ github.event.repository.name }}
IMAGE_TAGS: ${{ github.ref_name }}

jobs:
push-quay:
name: Build container image
runs-on: ubuntu-22.04

steps:
- name: Checkout Push to Registry action
uses: actions/checkout@v2

- name: Install qemu dependency
run: |
sudo apt-get update
sudo apt-get install -y qemu-user-static
- name: Build Image
id: build_image
uses: redhat-actions/buildah-build@v2
with:
image: ${{ env.IMAGE_NAME }}
tags: ${{ env.IMAGE_TAGS }}
archs: amd64, arm64
containerfiles: |
./Dockerfile
- name: Push To Registry
uses: redhat-actions/push-to-registry@v2
id: push_image
with:
image: ${{ steps.build_image.outputs.image }}
tags: ${{ steps.build_image.outputs.tags }}
registry: ${{ vars.IMAGE_REGISTRY }}/${{ vars.IMAGE_NAMESPACE }}
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_PASSWORD }}

0 comments on commit e7d240c

Please sign in to comment.