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
51 changes: 51 additions & 0 deletions .github/workflows/build_and_push_dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Build image, main branch push quay.io

on:
push:
branches: [ main ]

env:
IMAGE_NAME: lightspeed-stack
IMAGE_NAMESPACE: lightspeed-core
IMAGE_REGISTRY: quay.io
LATEST_TAG: dev-latest
CONTAINER_FILE: Containerfile

jobs:
build-and-push-dev:
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: Create dev image tag
run: |
echo "DEV_TAG=dev-$(date +%Y%m%d)-$(git rev-parse --short HEAD)" >> $GITHUB_ENV
echo "dev image tag: ${{ env.DEV_TAG }}"
- name: Build image with Buildah
id: build_image
uses: redhat-actions/buildah-build@v2
with:
image: ${{ env.IMAGE_NAME }}
tags: |
${{ env.DEV_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 }}