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

View File

@ -24,20 +24,24 @@ msg_ok "Installed dependencies"
msg_info "Installing PostgreSQL" msg_info "Installing PostgreSQL"
$STD apk add --no-cache \ $STD apk add --no-cache \
postgresql15 \ postgresql16 \
postgresql15-contrib \ postgresql16-contrib \
postgresql15-openrc postgresql16-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 /opt/bitmagnet mkdir -p /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 -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 echo "${RELEASE}" >/opt/bitmagnet_version.txt
msg_ok "Installed bitmagnet v${RELEASE}" msg_ok "Installed bitmagnet v${RELEASE}"
@ -68,5 +72,6 @@ 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"