Files
Michess/.gitea/workflows/docker-build.yml
Michess 0e7b9c61e1
Some checks failed
Build & Push Docker Image / build (push) Failing after 6s
ci: use localhost:3001 registry to bypass Cloudflare
2026-04-13 12:53:02 +02:00

40 lines
989 B
YAML

name: Build & Push Docker Image
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Setup
shell: sh
run: apk add --no-cache docker-cli bash git
- name: Checkout
uses: actions/checkout@v4
- name: Login to Gitea Registry
run: |
echo "${{ secrets.REGISTRY_TOKEN }}" | \
docker login localhost:3001 \
-u "${{ secrets.REGISTRY_USER }}" \
--password-stdin
- name: Build Docker Image
run: |
docker build \
--build-arg NEXT_PUBLIC_API_URL="${{ vars.NEXT_PUBLIC_API_URL }}" \
--build-arg NEXT_PUBLIC_APP_URL="${{ vars.NEXT_PUBLIC_APP_URL }}" \
-t localhost:3001/mrdiderot/michess:latest \
.
- name: Push to Registry
run: docker push localhost:3001/mrdiderot/michess:latest
- name: Logout
if: always()
run: docker logout localhost:3001