Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Build & Push

Build & Push #4

Workflow file for this run

name: Build & Push
on:
push:
branches:
- 'main'
jobs:
build-push:
runs-on: ubuntu-latest
env:
REGISTRY: ghcr.io/${{ github.repository_owner }}
IMAGE_NAME: nomad-logger
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build
id: build-image
uses: redhat-actions/buildah-build@v2
with:
image: ${{ env.IMAGE_NAME }}
tags: latest ${{ github.sha }}
containerfiles: |
./Containerfile
- name: Login to GitHub Container Registry
uses: redhat-actions/podman-login@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Container image 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: ${{ env.REGISTRY }}