Skip to content

Docker Image Build

Docker Image Build #23

Workflow file for this run

name: Docker Image Build
on:
workflow_dispatch:
inputs:
image_version:
description: 'The version of the Docker image'
required: true
scope:
description: 'Beta/Release ?'
type: choice
options:
- 'BETA'
- 'RELEASE'
required: true
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
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.3.0
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set environment variables
run: |
echo "REPO_OWNER=$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
echo "REPO_NAME=$(echo ${{ github.event.repository.name }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
echo "SCOPE=$(echo ${{ github.event.inputs.scope }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
- name: Build and push
uses: docker/build-push-action@v6.2.0
with:
context: ./FileStorage
file: ./FileStorage/Dockerfile
platforms: linux/amd64,linux/arm64,linux/arm64/v8
provenance: false
push: true
tags: |
ghcr.io/${{ env.REPO_OWNER }}/${{ env.REPO_NAME }}:latest
ghcr.io/${{ env.REPO_OWNER }}/${{ env.REPO_NAME }}:${{ github.event.inputs.image_version || 'latest' }}-${{ env.SCOPE }}