Initial commit: Gitea Actions demo project with Docker build
Some checks failed
Build and Push Docker Image / build (push) Failing after 6m27s

Add simple Node.js Hello World application with automated Docker build and
push workflow using Gitea Actions. The workflow builds and pushes images to
the Gitea registry with versioning from package.json.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Nikola Derežić
2026-01-09 11:24:17 +01:00
commit 70e721cc31
6 changed files with 152 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
name: Build and Push Docker Image
on:
push:
branches:
- master
- main
pull_request:
branches:
- master
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Read package.json version
id: package-version
run: |
VERSION=$(node -p "require('./package.json').version")
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Building version: $VERSION"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: |
registry.budakova.org/knee-cola/gitea-actions-demo-project:${{ steps.package-version.outputs.version }}
registry.budakova.org/knee-cola/gitea-actions-demo-project:latest
cache-from: type=registry,ref=registry.budakova.org/knee-cola/gitea-actions-demo-project:buildcache
cache-to: type=registry,ref=registry.budakova.org/knee-cola/gitea-actions-demo-project:buildcache,mode=max