Compare commits

...

10 Commits

Author SHA1 Message Date
99572cfe38 Changes to gitea workflow
Some checks failed
Shellcheck / Shellcheck (push) Has been cancelled
Create Changelog Pull Request / update-changelog-pull-request (push) Has been cancelled
Close Discussion on PR Merge / close-discussion (push) Has been cancelled
Sync to Gitea / sync (push) Has been cancelled
Update date_created in JSON files / update-date (push) Has been cancelled
Crawl Versions from newreleases.io / crawl-versions (push) Has been cancelled
Crawl Versions from github / crawl-versions (push) Has been cancelled
2025-05-13 13:58:55 +02:00
b7967013ec Changes to gitea workflow 2025-05-13 13:58:20 +02:00
958fd42cae Changes to gitea workflow 2025-05-13 13:57:52 +02:00
7a8bdd8ad7 Changes to gitea workflow 2025-05-13 13:57:17 +02:00
f5603ae4db Changes to gitea workflow 2025-05-13 13:56:48 +02:00
9894f888d5 Changes to gitea workflow 2025-05-13 13:54:26 +02:00
tremor021
ed8ba99a71 Update Bitmagnet 2025-05-13 13:35:54 +02:00
tremor021
fb93d80f9d Update Bitmagnet 2025-05-13 13:34:21 +02:00
ea8e618ff6 Changes to gitea workflow 2025-05-13 13:33:43 +02:00
9614c05b3c Changes to gitea workflow 2025-05-13 13:32:32 +02:00
2 changed files with 26 additions and 26 deletions

View File

@ -1,31 +1,26 @@
name: "Gitea Mirror Setup"
name: Sync to Gitea
on:
workflow_dispatch:
schedule:
- cron: 0 0 * * *
push:
branches:
- main
jobs:
build:
sync:
runs-on: ubuntu-latest
steps:
- uses: varunsridharan/action-gitea-mirror@main
name: " ⏳ Setting Up Mirror"
- name: Checkout source repo
uses: actions/checkout@v4
with:
gh_username: ${{ secrets.GH_USERNAME }}
gh_accesstoken: ${{ secrets.GH_TOKEN }}
gitea_host: ${{ secrets.GITEA_HOST }}
gitea_username: ${{ secrets.GITEA_USERNAME }}
gitea_accesstoken: ${{ secrets.GITEA_TOKEN }}
gitea_gist_prefix: "gist"
gitea_gist_surfix: ""
gistsSource: true
gistsStared: true
repositoryStared: true
repositorySource: true
repositoryForked: true
fetch-depth: 0
- name: Push to Gitea
run: |
git config --global user.name "Push From Github"
git config --global user.email "actions@github.com"
git remote add gitea http://$GITEA_USER:$GITEA_TOKEN@git.community-scripts.org/community-scripts/ProxmoxVED.git
git push gitea --mirror
env:
GITEA_USER: ${{ secrets.GITEA_USERNAME }}
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}

View File

@ -24,20 +24,24 @@ msg_ok "Installed dependencies"
msg_info "Installing PostgreSQL"
$STD apk add --no-cache \
postgresql15 \
postgresql15-contrib \
postgresql15-openrc
postgresql16 \
postgresql16-contrib \
postgresql16-openrc
$STD rc-update add postgresql
$STD rc-service postgresql start
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) }')
msg_info "Installing bitmagnet v${RELEASE}"
mkdir /opt/bitmagnet
mkdir -p /opt/bitmagnet
temp_file=$(mktemp)
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
cd /opt/bitmagnet
$STD go build -ldflags "-s -w -X github.com/bitmagnet-io/bitmagnet/internal/version.GitTag=$(git describe --tags --always --dirty)"
$STD go build
chmod +x bitmagnet
$STD su - postgres -c "psql -c 'CREATE DATABASE bitmagnet;'"
echo "${RELEASE}" >/opt/bitmagnet_version.txt
msg_ok "Installed bitmagnet v${RELEASE}"
@ -68,5 +72,6 @@ motd_ssh
customize
msg_info "Cleaning up"
rm -f $temp_file
$STD apk cache clean
msg_ok "Cleaned"