Compare commits
No commits in common. "99572cfe3898e96bc02610f3e25c2cdfb402ca2e" and "6712baf9775e27caf8b6c3dde68d6fe3fdf2cc5b" have entirely different histories.
99572cfe38
...
6712baf977
37
.github/workflows/push-to-gitea.yml
vendored
37
.github/workflows/push-to-gitea.yml
vendored
@ -1,26 +1,31 @@
|
|||||||
name: Sync to Gitea
|
name: "Gitea Mirror Setup"
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
schedule:
|
||||||
|
- cron: 0 0 * * *
|
||||||
|
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
sync:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout source repo
|
- uses: varunsridharan/action-gitea-mirror@main
|
||||||
uses: actions/checkout@v4
|
name: " ⏳ Setting Up Mirror"
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
gh_username: ${{ secrets.GH_USERNAME }}
|
||||||
|
gh_accesstoken: ${{ secrets.GH_TOKEN }}
|
||||||
- name: Push to Gitea
|
gitea_host: ${{ secrets.GITEA_HOST }}
|
||||||
run: |
|
gitea_username: ${{ secrets.GITEA_USERNAME }}
|
||||||
git config --global user.name "Push From Github"
|
gitea_accesstoken: ${{ secrets.GITEA_TOKEN }}
|
||||||
git config --global user.email "actions@github.com"
|
gitea_gist_prefix: "gist"
|
||||||
git remote add gitea http://$GITEA_USER:$GITEA_TOKEN@git.community-scripts.org/community-scripts/ProxmoxVED.git
|
gitea_gist_surfix: ""
|
||||||
git push gitea --mirror
|
gistsSource: true
|
||||||
env:
|
gistsStared: true
|
||||||
GITEA_USER: ${{ secrets.GITEA_USERNAME }}
|
repositoryStared: true
|
||||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
repositorySource: true
|
||||||
|
repositoryForked: true
|
||||||
|
@ -24,24 +24,20 @@ msg_ok "Installed dependencies"
|
|||||||
|
|
||||||
msg_info "Installing PostgreSQL"
|
msg_info "Installing PostgreSQL"
|
||||||
$STD apk add --no-cache \
|
$STD apk add --no-cache \
|
||||||
postgresql16 \
|
postgresql15 \
|
||||||
postgresql16-contrib \
|
postgresql15-contrib \
|
||||||
postgresql16-openrc
|
postgresql15-openrc
|
||||||
$STD rc-update add postgresql
|
|
||||||
$STD rc-service postgresql start
|
|
||||||
msg_ok "Installed PostreSQL"
|
msg_ok "Installed PostreSQL"
|
||||||
|
|
||||||
RELEASE=$(curl -s https://api.github.com/repos/bitmagnet-io/bitmagnet/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
RELEASE=$(curl -s https://api.github.com/repos/bitmagnet-io/bitmagnet/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||||
|
|
||||||
msg_info "Installing bitmagnet v${RELEASE}"
|
msg_info "Installing bitmagnet v${RELEASE}"
|
||||||
mkdir -p /opt/bitmagnet
|
mkdir /opt/bitmagnet
|
||||||
temp_file=$(mktemp)
|
temp_file=$(mktemp)
|
||||||
curl -fsSL "https://github.com/bitmagnet-io/bitmagnet/archive/refs/tags/v${RELEASE}.tar.gz" -o "$temp_file"
|
curl -fsSL "https://github.com/bitmagnet-io/bitmagnet/archive/refs/tags/v${RELEASE}.tar.gz" -o "$temp_file"
|
||||||
tar zxf "$temp_file" --strip-components=1 -C /opt/bitmagnet
|
tar zxf "$temp_file" --strip-components=1 -C /opt/bitmagnet
|
||||||
cd /opt/bitmagnet
|
cd /opt/bitmagnet
|
||||||
$STD go build
|
$STD go build -ldflags "-s -w -X github.com/bitmagnet-io/bitmagnet/internal/version.GitTag=$(git describe --tags --always --dirty)"
|
||||||
chmod +x bitmagnet
|
|
||||||
$STD su - postgres -c "psql -c 'CREATE DATABASE bitmagnet;'"
|
|
||||||
echo "${RELEASE}" >/opt/bitmagnet_version.txt
|
echo "${RELEASE}" >/opt/bitmagnet_version.txt
|
||||||
msg_ok "Installed bitmagnet v${RELEASE}"
|
msg_ok "Installed bitmagnet v${RELEASE}"
|
||||||
|
|
||||||
@ -72,6 +68,5 @@ motd_ssh
|
|||||||
customize
|
customize
|
||||||
|
|
||||||
msg_info "Cleaning up"
|
msg_info "Cleaning up"
|
||||||
rm -f $temp_file
|
|
||||||
$STD apk cache clean
|
$STD apk cache clean
|
||||||
msg_ok "Cleaned"
|
msg_ok "Cleaned"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user