ci: update build scripts, add default ARG values

This commit is contained in:
2025-06-01 15:37:14 -07:00
parent 433abb0fec
commit 9b2b7682e3
4 changed files with 142 additions and 34 deletions

View File

@@ -74,6 +74,21 @@ on:
default: '1.0.0'
type: string
# #
# Registry Name
#
# options:
# - github
# - dockerhub
# - gitea
# #
IMAGE_REGISTRY:
description: '📘 Registry Name'
required: true
default: 'dockerhub'
type: string
# #
# Dockerhub Author
#
@@ -100,6 +115,18 @@ on:
default: 'thebinaryninja'
type: string
# #
# Alpine Version
#
# specifies the alpine base docker image version
# #
ALPINE_VERSION:
description: '📀 Alpine Version'
required: true
default: '3.21'
type: string
# #
# true no changes to the repo will be made
# false workflow will behave normally, and push any changes detected to the files
@@ -137,8 +164,10 @@ on:
env:
IMAGE_NAME: ${{ github.event.inputs.IMAGE_NAME || 'tvapp2' }}
IMAGE_VERSION: ${{ github.event.inputs.IMAGE_VERSION || '1.0.0' }}
IMAGE_REGISTRY: ${{ github.event.inputs.IMAGE_VERSION || 'dockerhub' }}
IMAGE_DOCKERHUB_AUTHOR: ${{ github.event.inputs.IMAGE_DOCKERHUB_AUTHOR || 'thebinaryninja' }}
IMAGE_DOCKERHUB_USERNAME: ${{ github.event.inputs.IMAGE_DOCKERHUB_USERNAME || 'thebinaryninja' }}
ALPINE_VERSION: ${{ github.event.inputs.ALPINE_VERSION || '3.21' }}
BOT_NAME_1: EuropaServ
BOT_NAME_2: BinaryServ
@@ -280,7 +309,7 @@ jobs:
echo "NOW_LONG=$(date +'%m-%d-%Y %H:%M')" >> $GITHUB_ENV # 02-25-2025 12:49
echo "NOW_DOCKER_LABEL=$(date +'%Y%m%d')" >> $GITHUB_ENV # 20250225
echo "NOW_DOCKER_TS=$(date -u +'%FT%T.%3NZ')" >> $GITHUB_ENV # 2025-02-25T12:50:11.569Z
echo "GITHUB_SHA1=`git rev-parse HEAD`" >> ${GITHUB_ENV}
echo "GITHUB_SHA1=$(git rev-parse HEAD)" >> $GITHUB_ENV # 012cd0cc44c576c4a57b8a18d86793f244d1080a
# #
# Release Dockerhub Install Dependencies
@@ -420,10 +449,11 @@ jobs:
org.opencontainers.image.vendor=${{ env.REGISTRY_REPO_AUTHOR_LC }}
org.opencontainers.image.ref.name=${{ github.ref_name }}
org.opencontainers.image.development=${{ inputs.DEV_RELEASE == true && 'true' || 'false' }}
org.opencontainers.image.registry=dockerhub
org.opencontainers.image.registry=${{ env.IMAGE_REGISTRY }}
org.tvapp2.image.build-version="Version:- ${{ env.IMAGE_VERSION }} Date:- ${{ env.NOW_DOCKER_LABEL }}"
org.tvapp2.image.build-version-alpine=${{ env.IMAGE_VERSION }}
org.tvapp2.image.build-release="${{ inputs.DEV_RELEASE == true && 'development' || 'stable' }}"
org.tvapp2.image.build-sha1=${GITHUB_SHA1}
org.tvapp2.image.build-sha1=${{ env.GITHUB_SHA1 }}
annotations: |
org.opencontainers.image.created=${{ env.NOW_DOCKER_TS }}
org.opencontainers.image.version=${{ env.IMAGE_VERSION }}
@@ -432,10 +462,11 @@ jobs:
org.opencontainers.image.vendor=${{ env.REGISTRY_REPO_AUTHOR_LC }}
org.opencontainers.image.ref.name=${{ github.ref_name }}
org.opencontainers.image.development=${{ inputs.DEV_RELEASE == true && 'true' || 'false' }}
org.opencontainers.image.registry=dockerhub
org.opencontainers.image.registry=${{ env.IMAGE_REGISTRY }}
org.tvapp2.image.build-version="Version:- ${{ env.IMAGE_VERSION }} Date:- ${{ env.NOW_DOCKER_LABEL }}"
org.tvapp2.image.build-version-alpine=${{ env.IMAGE_VERSION }}
org.tvapp2.image.build-release="${{ inputs.DEV_RELEASE == true && 'development' || 'stable' }}"
org.tvapp2.image.build-sha1=${GITHUB_SHA1}
org.tvapp2.image.build-sha1=${{ env.GITHUB_SHA1 }}
# #
# Release Dockerhub Build and Push Amd64
@@ -461,6 +492,7 @@ jobs:
VERSION=${{ env.IMAGE_VERSION }}
BUILDDATE=${{ env.NOW_DOCKER_LABEL }}
GIT_SHA1=${{ env.GITHUB_SHA1 }}
ALPINE_VERSION=${{ env.ALPINE_VERSION }}
# #
# Release Dockerhub Export Digest Amd64
@@ -514,6 +546,7 @@ jobs:
VERSION=${{ env.IMAGE_VERSION }}
BUILDDATE=${{ env.NOW_DOCKER_LABEL }}
GIT_SHA1=${{ env.GITHUB_SHA1 }}
ALPINE_VERSION=${{ env.ALPINE_VERSION }}
# #
# Release Dockerhub Export Digest Arm64