Files
dj-spangebob/.gitea/workflows/build_container.yml
Patryk Koreń 459174e3c3
Some checks failed
Build and Push Docker Image / build-image (push) Has been cancelled
ci11
2026-01-07 21:41:38 +01:00

38 lines
961 B
YAML

name: Build and Push Docker Image
on:
push:
tags:
- '*' # Trigger on any git tag
jobs:
build-image:
runs-on: ubuntu-latest
container:
image: mgoltzsche/podman:5.7.1-minimal
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Build container image
run: |
podman build my-image:latest .
- name: Log in to Docker registry
env:
REGISTRY: https://gitea.papryk.com
REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }}
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
run: |
echo "$REGISTRY_PASSWORD" | podman login "$REGISTRY" -u "$REGISTRY_USERNAME" --password-stdin
- name: Build and push Docker image
env:
REGISTRY: https://gitea.papryk.com
IMAGE_NAME: Papryk/dj-spangebob
TAG: ${{ gitea.ref_name }}
run: |
podman push "$REGISTRY/$IMAGE_NAME:$TAG"