Skip to content

fix(ci): use podman native actions for build #29

fix(ci): use podman native actions for build

fix(ci): use podman native actions for build #29

Workflow file for this run

name: CI for Native Docker Image
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test-build:
name: Test Build on Pull Request
if: github.event_name == 'pull_request'
runs-on: self-hosted
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Build image for testing
uses: redhat-actions/buildah-build@v2
with:
image: podmortem-log-parser-test
tags: latest
dockerfiles: |
./src/main/docker/Dockerfile.native
build-args: |
GITHUB_USER=${{ github.actor }}
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
build-and-push:
name: Build and Push on Main
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: self-hosted
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Build image
id: build-image
uses: redhat-actions/buildah-build@v2
with:
image: ghcr.io/${{ github.repository_owner }}/podmortem-log-parser
tags: latest ${{ github.sha }}
dockerfiles: |
./src/main/docker/Dockerfile.native
build-args: |
GITHUB_USER=${{ github.actor }}
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
- name: Push to GitHub Container Registry
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build-image.outputs.image }}
tags: ${{ steps.build-image.outputs.tags }}
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GH_PAT }}