Skip to content

Merge pull request #2 from OpenTechIL/develop #3

Merge pull request #2 from OpenTechIL/develop

Merge pull request #2 from OpenTechIL/develop #3

Workflow file for this run

name: Build and Push to GHCR
on:
push:
branches:
- release
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
# Create a lowercase version of the repository name
- name: Set lower case owner and repo
run: |
echo "REPO_LOWER=${GITHUB_REPOSITORY,,}" >> ${GITHUB_ENV}
- name: Bump version and push tag
id: tagger
uses: mathieudutour/github-tag-action@v6.2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
tag_prefix: "v"
- name: Log in to GHCR
uses: redhat-actions/podman-login@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build Image
id: build_image
uses: redhat-actions/buildah-build@v2
with:
image: ghcr.io/${{ env.REPO_LOWER }}
tags: |
${{ steps.tagger.outputs.new_tag }}
latest
context: .
containerfiles: ./Dockerfile
- name: Push to GHCR
uses: redhat-actions/push-to-registry@v2
with:
tags: ${{ steps.build_image.outputs.tags }}