Skip to content

Add Containerfile and build action #1

Add Containerfile and build action

Add Containerfile and build action #1

Workflow file for this run

name: build
on:
push:
branches:
- rhbq-3.2
permissions:
packages: write
concurrency:
group: build
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: set datetime
run: |
echo "datetime=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV
- name: build image
id: build-image
uses: redhat-actions/buildah-build@v2
with:
image: antora-viewer
tags: latest ${{ github.ref_name }}
context: ./container
containerfiles: |
./Containerfile
build-args: |
CREATED_AT=${{ env.datetime }}
GITHUB_SHA=${{ github.sha }}
- name: push image to ghcr.io
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build-image.outputs.image }}
tags: ${{ steps.build-image.outputs.tags }}
registry: ghcr.io/redhat-gpte-devopsautomation
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}