-
-
Notifications
You must be signed in to change notification settings - Fork 780
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3170f0f
commit 6290872
Showing
13 changed files
with
161 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
output_engine = mustache("markdown") | ||
|
||
tag_filter_regexp = r'^v[0-9]+\.[0-9]+(\.[0-9]+)?$' | ||
|
||
ignore_regexps = [ | ||
r'@minor', r'!minor', | ||
r'@cosmetic', r'!cosmetic', | ||
r'@refactor', r'!refactor', | ||
r'@wip', r'!wip', | ||
r'^([cC]hg|[fF]ix|[nN]ew)\s*:\s*[p|P]kg:', | ||
r'^([cC]hg|[fF]ix|[nN]ew)\s*:\s*[d|D]ev:', | ||
r'^(.{3,3}\s*:)?\s*[fF]irst commit.?\s*$', | ||
r'^$', ## ignore commits with empty messages | ||
r'release: version.*', | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env bash | ||
previous_release=$(curl --silent "https://api.github.com/repos/hiddify/hiddify-central-config/releases/latest" | grep -Po '"tag_name": "\K.*?(?=")') | ||
current=$(cat VERSION) | ||
gitchangelog "${previous_release}..v$current" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# This is a basic workflow to help you get started with Actions | ||
|
||
name: CI | ||
|
||
# Controls when the workflow will run | ||
on: | ||
# Triggers the workflow on push or pull request events but only for the main branch | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
permissions: | ||
contents: write | ||
jobs: | ||
test: | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
os: [ubuntu-latest] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install project | ||
run: | | ||
sudo mkdir /opt/hiddify-central-config | ||
sudo cp -r * /opt/hiddify-central-config/ | ||
cd /opt/hiddify-central-config/ | ||
sudo bash install.sh | ||
- name: check working | ||
env: | ||
SQLALCHEMY_DATABASE_URI: sqlite:////opt/hiddify-central-config/hiddify-panel/database.db | ||
run: | | ||
cd /opt/hiddify-central-config/ | ||
grep -q -e '-----Finished!-----' log/system/0-install.log | ||
cd hiddify-panel;hiddifypanel all-configs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: Create Release | ||
|
||
on: | ||
push: | ||
# Sequence of patterns matched against refs/tags | ||
tags: | ||
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
permissions: | ||
contents: write | ||
jobs: | ||
test: | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
os: [ubuntu-latest] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install project | ||
run: | | ||
sudo mkdir /opt/hiddify-central-config | ||
sudo cp -r * /opt/hiddify-central-config/ | ||
cd /opt/hiddify-central-config/ | ||
sudo bash install.sh | ||
- name: check working | ||
env: | ||
SQLALCHEMY_DATABASE_URI: sqlite:////opt/hiddify-central-config/hiddify-panel/database.db | ||
run: | | ||
cd /opt/hiddify-central-config/ | ||
grep -q -e '-----Finished!-----' log/system/0-install.log | ||
cd hiddify-panel;hiddifypanel all-configs | ||
release: | ||
# if: startsWith(github.ref, 'refs/tags/v') | ||
name: Create Release | ||
runs-on: ubuntu-latest | ||
needs: test | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
# by default, it uses a depth of 1 | ||
# this fetches all history so that we can read each commit | ||
fetch-depth: 0 | ||
- name: Set up Python | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: '3.x' | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install gitchangelog pystache | ||
- name: Generate Changelog | ||
run: .github/release_message.sh > release_message.md | ||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
body_path: release_message.md |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
|
||
which gitchangelog | ||
if [[ "$?" != 0 ]];then | ||
pip3 install gitchangelog pystache | ||
fi | ||
previous_tag=$(git describe --tags $(git rev-list --tags --max-count=1)) | ||
echo "previous version was $previous_tag" | ||
read -p "Version? (provide the next x.y.z semver) : " TAG | ||
[[ $TAG = v* ]] && echo "incorrect tag" && exit 1 | ||
echo "${TAG}" > VERSION | ||
git tag v${TAG} | ||
gitchangelog > HISTORY.md | ||
git tag -d v${TAG} | ||
git add VERSION HISTORY.md | ||
git commit -m "release: version ${TAG} 🚀" | ||
echo "creating git tag : v${TAG}" | ||
git tag v${TAG} | ||
git push -u origin HEAD --tags | ||
echo "Github Actions will detect the new tag and release the new version." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,19 @@ | ||
#!/bin/bash | ||
function main(){ | ||
|
||
for s in netdata other/**/*.service **/*.service nginx;do | ||
s=${s##*/} | ||
s=${s%%.*} | ||
# printf "%-30s %-30s \n" $s $(systemctl is-active $s) | ||
for s in netdata other/**/*.service **/*.service nginx;do | ||
s=${s##*/} | ||
s=${s%%.*} | ||
systemctl kill $s | ||
systemctl disable $s | ||
|
||
done | ||
|
||
|
||
rm -rf /etc/cron.d/hiddify* | ||
service cron reload | ||
systemctl disable $s | ||
done | ||
rm -rf /etc/cron.d/hiddify* | ||
service cron reload | ||
if [[ "$1" == "purge" ]];then | ||
cd .. && rm -rf hiddify-central-panel | ||
apt remove -y nginx gunicorn python3-pip python3 | ||
echo "We have completely removed hiddify central panel" | ||
fi | ||
} | ||
|
||
mkdir -p log/system/ | ||
main |& tee log/system/uninstall.log | ||
main $@|& tee log/system/uninstall.log |
Binary file not shown.
This file was deleted.
Oops, something went wrong.