Files
vt/.gitea/workflows/build-docker-container.yaml
KoCoder 8a1f8968e0
Some checks failed
Build and Push Docker Image / build (push) Failing after 56s
CI: switch to buildah
2026-02-18 20:47:36 +01:00

46 lines
1.2 KiB
YAML

name: Build and Push Docker Image
on:
push:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
container:
image: quay.io/buildah/stable: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"
image: git.kocoder.xyz/kocoded/vt-be
tags: "${{ github.ref_name }} latest"
extra-args: |
--isolation=chroot
- 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