Skip to content

add github actions build #12

add github actions build

add github actions build #12

Workflow file for this run

name: Docker Image Build
on:
- pull_request
env:
ORG: opentelekomcloud
PROJECT: circle-partner-navigator-frontend
REGISTRY: quay.io
jobs:
build:
runs-on: arc-runner-set
steps:
- uses: actions/checkout@v4
- name: Buildah Action
id: build-image
uses: redhat-actions/buildah-build@v2
with:
containerfiles: ./Dockerfile
image: |
{{ $env.REGISTRY }}/{{ $env.ORG }}/{{ $env.PROJECT }}
tags: ${{ github.repository_id }}-${{ github.job }}
if_merged:
if: github.event.pull_request.merged == true
runs-on: arc-runner-set
steps:
- name: Buildah Action
id: build-image
uses: redhat-actions/buildah-build@v2
with:
containerfiles: ./Dockerfile
image: |
{{ $env.REGISTRY }}/{{ $env.ORG }}/{{ $env.PROJECT }}
tags: ${{ github.repository_id }}-${{ github.job }}
- name: Login
uses: redhat-actions/podman-login@v1
with:
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_PASSWORD }}
registry: ${{ env.REGISTRY }}
- name: Push
id: push-to-artifactory
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build-image.outputs.image }}
tags: ${{ github.repository_id }}-${{ github.job }} latest
registry:
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_PASSWORD }}