Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/workflows/build_and_push_release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Build image from a tag and push it to Quay.io

on:
push:
tags:
- '*' # Trigger for all tags

env:
IMAGE_NAME: lightspeed-stack
IMAGE_NAMESPACE: lightspeed-core
REGISTRY: quay.io
GIT_TAG: ${{ github.ref_name }}
LATEST_TAG: latest
CONTAINER_FILE: Containerfile

jobs:
build-and-push-release:
runs-on: ubuntu-latest
permissions:
contents: read
# Required for image pushing to a registry
packages: write
steps:
- name: Install buildah
run: |
sudo apt update
sudo apt install -y buildah
- name: Checkout code
uses: actions/checkout@v4
- name: Build image with Buildah
uses: redhat-actions/buildah-build@v2
with:
image: ${{ env.IMAGE_NAME }}
tags: |
${{ env.GIT_TAG }}
${{ env.LATEST_TAG }}
containerfiles: |
${{ env.CONTAINER_FILE }}
oci: true
- name: Push image to Quay.io
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build_image.outputs.image }}
tags: ${{ steps.build_image.outputs.tags }}
registry: ${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_NAMESPACE }}
username: ${{ secrets.QUAY_REGISTRY_USERNAME }}
password: ${{ secrets.QUAY_REGISTRY_PASSWORD }}