Files
vt/.gitea/workflows/build-docker-container.yaml
KoCoder 7c8495d8d4
Some checks failed
Build and Push Docker Image / build (push) Failing after 12s
Test buildah docker build.
2026-02-18 19:57:06 +01:00

42 lines
1.0 KiB
YAML

name: Build and Push Docker Image
on:
push:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Login to Registry
uses: docker/login-action@v2
with:
registry: git.kocoder.xyz
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Buildah Build
env:
BRANCH_NAME: ${{ github.ref_name }}
SHORT_HASH: ${{ github.sha }}
uses: redhat-actions/buildah-build@v2
with:
containerfiles: "Dockerfile"
iamge: git.kocoder.xyz/kocoded/vt-be
tags: ${{ github.ref_name }} latest
- name: Push Docker Images
env:
BRANCH_NAME: ${{ github.ref_name }}
SHORT_HASH: ${{ github.sha }}
run: |
docker push git.kocoder.xyz/kocoded/vt-be:${BRANCH_NAME}
docker push git.kocoder.xyz/kocoded/vt-be:latest
- name: Log out from registry
if: always()
run: docker logout git.kocoder.xyz