Files
ci-actions/docker/action.yaml
T
devastator 31379026f3 #7: Docker build command
+ url refernce updated
2026-09-28 21:31:51 +03:00

29 lines
944 B
YAML

name: build & push
description: build & push OCI container images to the Gitea registry
inputs:
name:
description: image name
required: true
tags:
description: newline-separated list of tags to tag the image
required: true
runs:
using: composite
steps:
- shell: bash
run: |
echo ${GITHUB_SERVER_URL} ${GITHUB_API_URL} ${{ gitea.event.repository.html_url }} ${{ gitea.api_url }} ${{ gitea.repositoryUrl }} ${{ gitea.server_url }}
repo_url="${GITHUB_SERVER_URL}"
repo_host="${repo_url#https://}"
repo_host="${repo_host%%/*}"
docker login --username acti-bot --password ${ACTI_BOT_TOKEN} ${repo_host}
while IFS= read -r tag; do
[[ -z "$tag" ]] && continue
image="${repo_host}/${{ gitea.repository }}/${{ inputs.name }}:$tag"
docker build -f Containerfile -t $image
docker push $image
done <<< "${{ inputs.tags }}"