updated ci
All checks were successful
Build and Push Docker Image / build-and-push (release) Successful in 48s

This commit is contained in:
2025-10-16 13:30:45 +03:00
parent 9d355a926e
commit e1bbf19387
6 changed files with 174 additions and 3 deletions

15
.dockerignore Normal file
View File

@ -0,0 +1,15 @@
#.dockerignore
# Gitea
.gitea
# Docker
.dockerignore
dockerfile
compose.yaml
compose.yml
# Git
.gitignore
*.md
example.env
LICENSE

View File

@ -0,0 +1,49 @@
name: Build and Push Docker Image
on:
release:
types: [published]
env:
REGISTRY: git.frik.su
IMAGE_NAME: ${{ gitea.repository }}
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Docker
run: curl -fsSL https://get.docker.com | sh
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Extract Docker tags from release
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=tag
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

89
.gitignore vendored Normal file
View File

@ -0,0 +1,89 @@
# compiled output
/dist
/tmp
/out-tsc
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
# nyc test coverage
.nyc_output
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# IDEs and editors
.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace
# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
# misc
.sass-cache
connect.lock
typings
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Dependency directories
node_modules/
jspm_packages/
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variables file
.env
# next.js build output
.next
# Lerna
lerna-debug.log
# System Files
.DS_Store
Thumbs.db

View File

@ -13,8 +13,10 @@ services:
image: git.frik.su/Beesquit/work-timerer:latest
container_name: work-timerer
ports:
4000:80
restart: unless stopped
- 4000:80
volumes:
- ./src:/usr/share/nginx/html
restart: unless-stopped
```
The application should be available at the `localhost:4000`

View File

@ -0,0 +1,9 @@
services:
work-timerer:
image: git.frik.su/Beesquit/work-timerer:latest
container_name: work-timerer
ports:
- 4000:80
volumes:
- ./src:/usr/share/nginx/html
restart: unless-stopped

7
dockerfile Normal file
View File

@ -0,0 +1,7 @@
FROM nginx:alpine
WORKDIR /app
COPY src/ /usr/share/nginx/html
CMD ["nginx", "-g", "daemon off;"]