wip
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 23s

This commit is contained in:
2026-03-25 09:50:35 +03:00
parent aec1be6179
commit 516f3909ee
2 changed files with 22 additions and 28 deletions

View File

@@ -1,26 +1,27 @@
name: Gitea Actions Demo
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
run-name: Deploy 🚀
on:
push:
branches:
- dev
- main
jobs:
Explore-Gitea-Actions:
runs-on: ubuntu-latest
steps:
- run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event.."
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!"
- run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
- name: Check out repository code
uses: actions/checkout@v3
- run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner."
- run: echo "🖥️ The workflow is now ready to test your code on the runner!"
# - name: List files in the repository
# run: |
# ls ${{ gitea.workspace }}
# docker run -d --name tracker -p 3300:3000 git.madsky.ru/vadim/tracker:latest
- name: List files in the repository
- name: Checkout repository
uses: actions/checkout@v6
- name: Docker build
run: docker build --tag git.madsky.ru/vadim/socket-service .
- name: Login to gitea
uses: docker/login-action@v4
with:
registry: git.madsky.ru
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
- name: Push Docker image to gitea registry
run: |
ls ${{ gitea.workspace }}
- run: echo "🍏 This job's status is ${{ job.status }}."
IMAGE_TAG="git.madsky.ru/vadim/socket-service:${{ gitea.sha }}"
docker tag git.madsky.ru/vadim/socket-service $IMAGE_TAG
docker push $IMAGE_TAG
- name: Ready
run: echo "Success!"

View File

@@ -1,17 +1,10 @@
#FROM node:lts-alpine
FROM oven/bun:canary-alpine
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY package.json ./
COPY package.json bun.lock ./
RUN bun install --frozen-lockfile
COPY . .
RUN npm run build
RUN apk add --no-cache tzdata
ENV NODE_ENV=production
ENV TZ=Europe/Moscow
CMD ["node", "dist/main"]
EXPOSE 3000/tcp
ENTRYPOINT [ "bun", "run", "index.ts" ]
ENTRYPOINT [ "bun", "run", "src/index.ts" ]