Skip to content

Build fstack image

Build fstack image #3

name: Build fstack image
on:
# Manually trigger
workflow_dispatch:
inputs:
reason:
description: 'Why ?'
required: false
default: ''
env:
REGISTRY: ghcr.io
IMAGE_NAME: photon-ut-fstack
jobs:
ghcr_build_and_push:
runs-on: ubuntu-latest
steps:
- name: Set lower case owner name
run: |
echo "OWNER_LC=${OWNER,,}" >> ${GITHUB_ENV}
env:
OWNER: '${{ github.repository_owner }}'
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push image
uses: docker/build-push-action@v6
with:
# path context
context: .github/workflows/images/fstack
push: true
tags: |
${{ env.REGISTRY }}/${{ env.OWNER_LC }}/${{ env.IMAGE_NAME }}:${{ github.sha }}
${{ env.REGISTRY }}/${{ env.OWNER_LC }}/${{ env.IMAGE_NAME}}:latest
platforms: linux/amd64,linux/arm64