Files
Skori/.gitea/workflows/docker-build.yml
T
Zed e2fa88e10e
Build and Publish Docker Image / build-and-push-image (push) Failing after 7s
Fix unauthorized error by using GITHUB_TOKEN instead of GITEA_TOKEN
2026-07-06 19:17:38 +02:00

31 lines
814 B
YAML

name: Build and Publish Docker Image
on:
push:
branches:
- master
env:
REGISTRY: 192.168.10.174:3000
IMAGE_NAME: ${{ gitea.repository }}
jobs:
build-and-push-image:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
# Simple login directly with docker login
- name: Log in to the Container registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ${{ env.REGISTRY }} -u "${{ gitea.actor }}" --password-stdin
# Build standard using docker CLI
- name: Build Docker image
run: docker build -t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest .
# Push directly using docker push
- name: Push Docker image
run: docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest