Files
GL/.gitea/actions/docker-build-push/action.yml
T

32 lines
749 B
YAML

name: Docker Build
description: Build image and load it into the local Docker daemon
inputs:
image:
description: Full image name without a tag
required: true
branch:
description: Branch tag
required: true
commit_sha:
description: Commit SHA tag
required: true
runs:
using: composite
steps:
- name: Build
shell: bash
env:
IMAGE: ${{ inputs.image }}
BRANCH: ${{ inputs.branch }}
COMMIT_SHA: ${{ inputs.commit_sha }}
run: |
set -euo pipefail
docker buildx build \
-f build/Dockerfile \
--build-arg "GO_PROXY=https://go.reg.darano.ir" \
--load \
-t "$IMAGE:$BRANCH" \
-t "$IMAGE:$COMMIT_SHA" \
.