docker: build locally on NAS, no registry needed
This commit is contained in:
@@ -1,39 +1,11 @@
|
||||
name: Build & Push Docker Image
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
workflow_dispatch:
|
||||
|
||||
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
|
||||
- name: Info
|
||||
run: echo "Manueller Build-Trigger. Image wird direkt auf der NAS gebaut."
|
||||
|
||||
Reference in New Issue
Block a user