Skip to content

Merge pull request #111 from avalonmediasystem/development #4

Merge pull request #111 from avalonmediasystem/development

Merge pull request #111 from avalonmediasystem/development #4

Workflow file for this run

# Builds image and stores in ghcr.io
name: Podman Image CI
on:
push:
branches: [ "development", "main" ]
env:
REGISTRY_USER: ${{ github.actor }}
REGISTRY_PASSWORD: ${{ github.token }}
IMAGE_REGISTRY: ghcr.io/avalonmediasystem
IMAGE_TAG: ${{ fromJSON('{"refs/heads/development":"staging","refs/heads/main":"production"}')[github.ref] }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build Image
id: build_image
uses: redhat-actions/buildah-build@v2
with:
image: switchyard
tags: ${{ env.IMAGE_TAG }} ${{ github.sha }}
containerfiles: ./Dockerfile
extra-args: --target production
oci: true
- name: Push To GHCR
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build_image.outputs.image }}
tags: ${{ steps.build_image.outputs.tags }}
registry: ${{ env.IMAGE_REGISTRY }}
username: ${{ env.REGISTRY_USER }}
password: ${{ env.REGISTRY_PASSWORD }}
extra-args: |
--disable-content-trust