You've already forked hotpocket
BTHLABS-0000: development workflow
Co-authored-by: Tomek Wójcik <labs@tomekwojcik.pl> Co-committed-by: Tomek Wójcik <labs@tomekwojcik.pl>
This commit is contained in:
26
.gitea/actions/get-build-options/action.yaml
Normal file
26
.gitea/actions/get-build-options/action.yaml
Normal file
@@ -0,0 +1,26 @@
|
||||
name: "Get Build Options"
|
||||
description: "Sanitizies and unifies the environment into build options"
|
||||
outputs:
|
||||
short-sha:
|
||||
description: "Shortened hash if the current commit"
|
||||
build-arch:
|
||||
description: "Docker-compatible representation of build arch"
|
||||
build-platform:
|
||||
description: "Docker-compatible representation of build platform"
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: "Compute Build Options"
|
||||
shell: "bash"
|
||||
run: |
|
||||
set -x
|
||||
SHORT_SHA="${GITHUB_SHA::8}"
|
||||
BUILD_ARCH="amd64"
|
||||
BUILD_PLATFORM="linux/amd64"
|
||||
if [ "${RUNNER_ARCH}" = "ARM64" ];then
|
||||
BUILD_ARCH="arm64"
|
||||
BUILD_PLATFORM="linux/arm64"
|
||||
fi
|
||||
echo "short-sha=$SHORT_SHA" >> $GITHUB_OUTPUT
|
||||
echo "build-arch=$BUILD_ARCH" >> $GITHUB_OUTPUT
|
||||
echo "build-platform=$BUILD_PLATFORM" >> $GITHUB_OUTPUT
|
||||
Reference in New Issue
Block a user