From f04b20dfc036a773957cbb3c9baa177896a7e505 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D1=80=D1=82=D1=91=D0=BC=20=D0=93=D1=80=D0=B0=D1=87?= =?UTF-8?q?=D1=91=D0=B2?= Date: Mon, 13 Apr 2026 18:30:43 +0300 Subject: [PATCH] add .gitea actions --- .../workflows/build-and-push.yaml | 34 +++++------ .github/FUNDING.yml | 1 - .github/stale.yml | 57 ----------------- .github/workflows/lint.yml | 31 ---------- .github/workflows/release.yml | 61 ------------------- LICENSE | 1 + package.json | 6 +- 7 files changed, 19 insertions(+), 172 deletions(-) rename .github/workflows/docker-build.yml => .gitea/workflows/build-and-push.yaml (62%) delete mode 100644 .github/FUNDING.yml delete mode 100644 .github/stale.yml delete mode 100644 .github/workflows/lint.yml delete mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/docker-build.yml b/.gitea/workflows/build-and-push.yaml similarity index 62% rename from .github/workflows/docker-build.yml rename to .gitea/workflows/build-and-push.yaml index 8960a48..c75d0dc 100644 --- a/.github/workflows/docker-build.yml +++ b/.gitea/workflows/build-and-push.yaml @@ -9,7 +9,8 @@ on: jobs: build-image: - runs-on: ubuntu-22.04 + # [ИЗМЕНЕНИЕ 1]: У нашего раннера стоит метка ubuntu-latest (как мы видели на скриншоте) + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -20,17 +21,15 @@ jobs: - name: Set GIT_COMMIT env run: echo "GIT_COMMIT=$(git rev-parse --short HEAD)" >> $GITHUB_ENV - - name: Environment printer - uses: managedkaos/print-env@v1.0 - - name: Prepare image tags id: image-tags run: | - base=ngoduykhanh/wireguard-ui + # [ИЗМЕНЕНИЕ 2]: Меняем репозиторий с ngoduykhanh на твой личный реестр Gitea. + # ЗАМЕНИ 'admin' на свой логин в Gitea, если он отличается (и пиши его в нижнем регистре!) + base=git.roskompid.org/admin/wireguard-ui app_version=dev ## Set git tag as image tag - ## if [[ '${{ github.ref }}' == *"refs/tags/"* ]]; then github_tag="${GITHUB_REF#refs/*/}" app_version=${github_tag} @@ -46,8 +45,6 @@ jobs: ) ## Set 'latest' image tag if 'main' or 'master' - ## branch is pushed - ## elif [[ '${{ github.ref }}' == 'refs/heads/master' || '${{ github.ref }}' == 'refs/heads/main' ]]; then container_images=$(cat <> $GITHUB_OUTPUT echo "$container_images" >> $GITHUB_OUTPUT echo "EOF" >> $GITHUB_OUTPUT - ## Set APP_VERSION env - # echo "APP_VERSION=${app_version}" >> $GITHUB_ENV - # set up docker and build images + # [ИЗМЕНЕНИЕ 3]: QEMU и Buildx отлично работают внутри DinD, оставляем как есть! - name: Set up QEMU uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - name: Login to Docker Hub + # [ИЗМЕНЕНИЕ 4]: Авторизация в твоей Gitea вместо Docker Hub + - name: Login to Gitea Container Registry uses: docker/login-action@v3 with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} + registry: git.roskompid.org + # github.actor автоматически подставит твой логин (тот, кто сделал push) + username: ${{ github.actor }} + # GITEA_TOKEN генерируется самой системой для каждого запуска, его не нужно создавать руками! + password: ${{ secrets.GITEA_TOKEN }} - name: Build and push uses: docker/build-push-action@v5 @@ -93,5 +88,6 @@ jobs: APP_VERSION=${{ env.APP_VERSION }} BUILD_TIME=${{ env.BUILD_TIME }} GIT_COMMIT=${{ env.GIT_COMMIT }} + # [ИЗМЕНЕНИЕ 5]: Кэш GHA поддерживается свежими версиями Gitea, оставляем! cache-from: type=gha - cache-to: type=gha,mode=max + cache-to: type=gha,mode=max \ No newline at end of file diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index 92019bc..0000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1 +0,0 @@ -github: [Gra4art] diff --git a/.github/stale.yml b/.github/stale.yml deleted file mode 100644 index 5e6b505..0000000 --- a/.github/stale.yml +++ /dev/null @@ -1,57 +0,0 @@ -# Configuration for probot-stale - https://github.com/probot/stale - -# Number of days of inactivity before an Issue or Pull Request becomes stale -daysUntilStale: 60 - -# Number of days of inactivity before an Issue or Pull Request with the stale label is closed. -# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale. -daysUntilClose: 7 - -# Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled) -onlyLabels: [] - -# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable -exemptLabels: [] - -# Set to true to ignore issues in a project (defaults to false) -exemptProjects: false - -# Set to true to ignore issues in a milestone (defaults to false) -exemptMilestones: false - -# Set to true to ignore issues with an assignee (defaults to false) -exemptAssignees: false - -# Label to use when marking as stale -staleLabel: stale - -# Comment to post when marking as stale. Set to `false` to disable -markComment: > - This issue has been automatically marked as stale because it has not had - recent activity. It will be closed if no further activity occurs. Thank you - for your contributions. - -# Comment to post when closing a stale Issue or Pull Request. -# closeComment: > -# Your comment here. - -# Limit the number of actions per hour, from 1-30. Default is 30 -limitPerRun: 30 - -# Limit to only `issues` or `pulls` -only: issues - -# Optionally, specify configuration settings that are specific to just 'issues' or 'pulls': -# pulls: -# daysUntilStale: 30 -# markComment: > -# This pull request has been automatically marked as stale because it has not had -# recent activity. It will be closed if no further activity occurs. Thank you -# for your contributions. - -issues: - exemptLabels: - - enhancement - - feature request - - documentation - - bug diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index 39fc51f..0000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: Lint - -on: - push: - branches: - - master - pull_request: - branches: - - master - -permissions: - contents: read - pull-requests: read - checks: write - -jobs: - lint: - name: Lint - runs-on: ubuntu-22.04 - timeout-minutes: 10 - steps: - - uses: actions/checkout@v4 - - - uses: actions/setup-go@v3 - with: - go-version: "1.21" - - - name: golangci-lint - uses: golangci/golangci-lint-action@v3 - with: - version: v1.54 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 4205bde..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,61 +0,0 @@ -name: wireguard-ui build release - -on: - release: - types: [created] - -jobs: - releases-matrix: - name: Release Go Binary - runs-on: ubuntu-22.04 - strategy: - fail-fast: false - matrix: - # build and publish in parallel: linux/386, linux/amd64, darwin/386, darwin/amd64 - goos: [linux, freebsd, darwin] - goarch: [386, amd64, arm, arm64] - exclude: - - goarch: 386 - goos: darwin - - goarch: arm - goos: darwin - - goarch: arm64 - goos: darwin - goarm: - - 7 - steps: - # get the source code - - uses: actions/checkout@v4 - - # set environment - - name: Set APP_VERSION env - run: echo "APP_VERSION=$(echo ${GITHUB_REF} | rev | cut -d'/' -f 1 | rev )" >> $GITHUB_ENV - - name: Set BUILD_TIME env - run: echo "BUILD_TIME=$(date)" >> $GITHUB_ENV - - name: Environment Printer - uses: managedkaos/print-env@v1.0 - - # setup node - - uses: actions/setup-node@v4 - with: - node-version: '20' - registry-url: 'https://registry.npmjs.org' - - # prepare assets - - name: Prepare assets - run: | - chmod +x ./prepare_assets.sh - ./prepare_assets.sh - - # build and make the releases - - name: Build and make the releases - uses: wangyoucao577/go-release-action@master - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - goos: ${{ matrix.goos }} - goarch: ${{ matrix.goarch }} - goversion: "https://dl.google.com/go/go1.21.5.linux-amd64.tar.gz" - pre_command: export CGO_ENABLED=0 - binary_name: "wireguard-ui" - build_flags: -v - ldflags: -X "main.appVersion=${{ env.APP_VERSION }}" -X "main.buildTime=${{ env.BUILD_TIME }}" -X main.gitCommit=${{ github.sha }} -X main.gitRef=${{ github.ref }} diff --git a/LICENSE b/LICENSE index d7c99ad..ba1d362 100644 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,6 @@ The MIT License (MIT) +Copyright (c) 2026 Gra4art - Gra4art Copyright (c) 2020 Khanh Ngo - k[at]ndk.name Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/package.json b/package.json index a0cda64..235134b 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,10 @@ { "name": "wireguard-ui", - "version": "1.0.0", + "version": "beta", "description": "Wireguard web interface", "main": "index.js", - "repository": "git@github.com:ngoduykhanh/wireguard-ui.git", - "author": "Khanh Ngo ", + "repository": "git@github.com:gra4art/wireguard-ui.git", + "author": "Gra4art", "license": "MIT", "dependencies": { "admin-lte": "^3.0",