Skip to content

Oops committed a copy of the CloudFormation template #14

Oops committed a copy of the CloudFormation template

Oops committed a copy of the CloudFormation template #14

name: Build and push container image
on:
push:
branches:
- main
jobs:
build:
name: Build container image
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Clone the repository
uses: actions/checkout@v4
- name: Use Buildah to create container image
id: build-image
uses: redhat-actions/buildah-build@v2
with:
image: ocp4-disconnected
tags: latest ${{ github.sha }}
containerfiles: |
./Containerfile
- name: Push container image to registry
id: push-to-ghcr
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build-image.outputs.image }}
tags: ${{ steps.build-image.outputs.tags }}
registry: ghcr.io/${{ github.repository_owner }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Output image URL
run: echo "Image pushed to ${{ steps.push-to-ghcr.outputs.registry-paths }}"