add .gitea actions
Some checks failed
Build container images / build-image (push) Has been cancelled
Some checks failed
Build container images / build-image (push) Has been cancelled
This commit is contained in:
@@ -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 <<END_HEREDOC
|
||||
${base}:latest
|
||||
@@ -55,32 +52,30 @@ jobs:
|
||||
)
|
||||
fi
|
||||
|
||||
## Print tags for debugging purpose
|
||||
##
|
||||
echo "[INFO] container_images: ${container_images}"
|
||||
|
||||
## Set container_images output
|
||||
##
|
||||
echo "container_images<<EOF" >> $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
|
||||
1
.github/FUNDING.yml
vendored
1
.github/FUNDING.yml
vendored
@@ -1 +0,0 @@
|
||||
github: [Gra4art]
|
||||
57
.github/stale.yml
vendored
57
.github/stale.yml
vendored
@@ -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
|
||||
31
.github/workflows/lint.yml
vendored
31
.github/workflows/lint.yml
vendored
@@ -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
|
||||
61
.github/workflows/release.yml
vendored
61
.github/workflows/release.yml
vendored
@@ -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 }}
|
||||
1
LICENSE
1
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
|
||||
|
||||
@@ -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 <k@ndk.name>",
|
||||
"repository": "git@github.com:gra4art/wireguard-ui.git",
|
||||
"author": "Gra4art",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"admin-lte": "^3.0",
|
||||
|
||||
Reference in New Issue
Block a user