upd workflow

This commit is contained in:
mt77 2025-08-13 22:50:12 +05:00
parent 8afaae2dca
commit fb35acdb20
11 changed files with 46 additions and 289 deletions

View File

@ -0,0 +1,32 @@
name: Build Application
on:
push:
tags:
- 'v*.*'
jobs:
build:
runs-on: large
steps:
# Шаг 1: Checkout кода
- name: Checkout repository
uses: actions/checkout@v3
# Шаг 2: Логин в Docker Registry (Gitea)
- name: Login to Gitea Container Registry
uses: docker/login-action@v3
with:
registry: ${{ vars.GIT_INSTANCE }} # Замените на адрес вашего Gitea
username: ${{ secrets.GIT_USERNAME }}
password: ${{ secrets.GIT_TOKEN }}
# Шаг 3: Сборка и пуш Docker образа
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: ./
push: true
tags: |
${{ vars.GIT_INSTANCE }}/${{ secrets.GIT_USERNAME }}/${{ vars.REPOSITORY }}:latest
${{ vars.GIT_INSTANCE }}/${{ secrets.GIT_USERNAME }}/${{ vars.REPOSITORY }}:${{ github.sha }}

View File

@ -1,63 +0,0 @@
# Contribution Guidelines
Table of Contents:
<!-- vim-markdown-toc GFM -->
* [Did you find a bug?](#did-you-find-a-bug)
* [Is it a Security Vulnerability?](#is-it-a-security-vulnerability)
* [Is it already a known issue?](#is-it-already-a-known-issue)
* [Reporting a Bug](#reporting-a-bug)
* [Is there a patch for the bug?](#is-there-a-patch-for-the-bug)
* [Do you want to add a new feature?](#do-you-want-to-add-a-new-feature)
* [Is it just an idea?](#is-it-just-an-idea)
* [Is there a patch for the feature?](#is-there-a-patch-for-the-feature)
* [Do you have questions about the Synapse Admin project or need guidance?](#do-you-have-questions-about-the-synapse-admin-project-or-need-guidance)
<!-- vim-markdown-toc -->
## Did you find a bug?
### Is it a Security Vulnerability?
Please follow the [Security Policy](https://github.com/etkecc/synapse-admin/blob/main/.github/SECURITY.md) for reporting
security vulnerabilities.
### Is it already a known issue?
Please ensure the bug was not already reported by searching [the Issues section](https://github.com/etkecc/synapse-admin/issues).
### Reporting a Bug
If you think you have found a bug in Synapse Admin, it is not a security vulnerability, and it is not already reported,
please open [a new issue](https://github.com/etkecc/synapse-admin/issues/new) with:
* A proper title and clear description of the problem.
* As much relevant information as possible:
* The version of Synapse Admin you are using.
* The version of Synapse you are using.
* Any relevant browser console logs, failed requests details, and error messages.
### Is there a patch for the bug?
If you already have a patch for the bug, please open a pull request with the patch,
and mention the issue number in the pull request description.
## Do you want to add a new feature?
### Is it just an idea?
Please open [a new issue](https://github.com/etkecc/synapse-admin/issues/new) with:
* A proper title and clear description of the requested feature.
* Any relevant information about the feature:
* Why do you think this feature is needed?
* How do you think it should work? (provide Synapse Admin API endpoint)
* Any relevant screenshots or mockups.
### Is there a patch for the feature?
If you already have a patch for the feature, please open a pull request with the patch,
and mention the issue number in the pull request description.
## Do you have questions about the Synapse Admin project or need guidance?
Please use the official community Matrix room: [#synapse-admin:etke.cc](https://matrix.to/#/#synapse-admin:etke.cc)

1
.github/FUNDING.yml vendored
View File

@ -1 +0,0 @@
liberapay: etkecc

View File

@ -1,34 +0,0 @@
---
name: Bug report
about: Report a Synapse Admin bug
title: ''
labels: bug
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Browser console logs**
If applicable, add the browser console's log
**Instance configuration:**
- Synapse Admin version: [e.g. v0.10.3-etke39]
- Synapse version [v1.127.1]
**Additional context**
Add any other context about the problem here.

View File

@ -1,23 +0,0 @@
---
name: Feature request
about: Suggest an idea for Synapse Admin
title: ''
labels: enhancement
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Provide related Synapse Admin API endpoints**
If applicable, provide links to the Synapse Admin API's endpoints that could be used to implement that feature
**Additional context**
Add any other context or screenshots about the feature request here.

14
.github/SECURITY.md vendored
View File

@ -1,14 +0,0 @@
# Security Policy
## Supported Versions
Only [the last published version](https://github.com/etkecc/synapse-admin/releases/latest) of the project is supported.
This means that only the latest version will receive security updates.
If you are using an older version, you are strongly encouraged to upgrade to the latest version.
## Reporting a Vulnerability
Please contact us using the [#synapse-admin:etke.cc](https://matrix.to/#/#synapse-admin:etke.cc) Matrix room.
The Synapse Admin project is a static JS UI for the Synapse server,
so it is unlikely that there are (or will be) any impactful security vulnerabilities in the project itself.
However, we do not rule out the possibility of such cases, so we will be happy to receive any reports!

View File

@ -1,19 +0,0 @@
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 30
- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 30
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 30

View File

@ -1,121 +0,0 @@
name: CI
on:
push:
branches: [ "main" ]
tags: [ "v*" ]
env:
bunny_version: v0.1.0
base_path: ./
permissions:
checks: write
contents: write
packages: write
pull-requests: read
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: lts/*
cache: yarn
- name: Install dependencies
run: yarn install --immutable --network-timeout=300000
- name: Build
run: yarn build --base=${{ env.base_path }}
- uses: actions/upload-artifact@v4
with:
path: dist/
name: dist
if-no-files-found: error
retention-days: 1
compression-level: 0
overwrite: true
include-hidden-files: true
docker:
name: Docker
needs: build
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v5
with:
name: dist
path: dist/
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
- name: Login to ghcr.io
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3.5.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to hub.docker.com
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3.5.0
with:
username: etkecc
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f # v5.8.0
with:
images: |
${{ github.repository }}
ghcr.io/${{ github.repository }}
registry.etke.cc/${{ github.repository }}
tags: |
type=raw,value=latest,enable=${{ github.ref_name == 'main' }}
type=semver,pattern={{raw}}
- name: Build and push
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
with:
platforms: linux/amd64,linux/arm64
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cdn:
name: CDN
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v5
with:
name: dist
path: dist/
- name: Upload
run: |
wget -O bunny-upload.tar.gz https://github.com/etkecc/bunny-upload/releases/download/${{ env.bunny_version }}/bunny-upload_Linux_x86_64.tar.gz
tar -xzf bunny-upload.tar.gz
echo "${{ secrets.BUNNY_CONFIG }}" > bunny-config.yaml
./bunny-upload -c bunny-config.yaml
github-release:
name: Github Release
needs: build
if: ${{ startsWith(github.ref, 'refs/tags/') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v5
with:
name: dist
path: dist/
- name: Prepare release
run: |
mv dist synapse-admin
tar chvzf synapse-admin.tar.gz synapse-admin
- uses: softprops/action-gh-release@72f2c25fcb47643c292f7107632f7a47c1df5cd8 # v2.3.2
with:
files: synapse-admin.tar.gz
generate_release_notes: true
make_latest: "true"
draft: false
prerelease: false

View File

@ -1,5 +1,11 @@
FROM node:lts AS builder
ARG BASE_PATH=./
WORKDIR /src
COPY . /src
RUN yarn config set enableTelemetry 0 && \
yarn install --immutable --network-timeout=300000 && \
yarn build --base=$BASE_PATH
FROM ghcr.io/static-web-server/static-web-server:2
ENV SERVER_ROOT=/app
COPY ./dist /app
COPY --from=builder /src/dist /app

View File

@ -1,11 +0,0 @@
FROM node:lts AS builder
ARG BASE_PATH=./
WORKDIR /src
COPY . /src
RUN yarn config set enableTelemetry 0 && \
yarn install --immutable --network-timeout=300000 && \
yarn build --base=$BASE_PATH
FROM ghcr.io/static-web-server/static-web-server:2
ENV SERVER_ROOT=/app
COPY --from=builder /src/dist /app

5
Dockerfile.old Normal file
View File

@ -0,0 +1,5 @@
FROM ghcr.io/static-web-server/static-web-server:2
ENV SERVER_ROOT=/app
COPY ./dist /app