Compare commits
2 Commits
v0.0.1
...
971a7f9491
Author | SHA1 | Date | |
---|---|---|---|
971a7f9491
|
|||
c734924efc
|
@ -1,54 +0,0 @@
|
|||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
release:
|
|
||||||
types:
|
|
||||||
- published
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-deploy:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
env:
|
|
||||||
DOCKER_LATEST: nightly
|
|
||||||
DOCKER_ORG: beisel.org
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout Code
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Setup Docker
|
|
||||||
run: curl -fsSL https://get.docker.com | sh
|
|
||||||
|
|
||||||
- name: Setup Docker BuildX
|
|
||||||
uses: docker/setup-buildx-action@v2
|
|
||||||
with:
|
|
||||||
config-inline: |
|
|
||||||
[registry."https://git.beisel.it"]
|
|
||||||
|
|
||||||
- name: Login to Registry
|
|
||||||
uses: docker/login-action@v2
|
|
||||||
with:
|
|
||||||
registry: git.beisel.it # replace it with your local IP
|
|
||||||
username: ${{ gitea.actor }}
|
|
||||||
password: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
|
|
||||||
|
|
||||||
- name: Get Meta
|
|
||||||
id: meta
|
|
||||||
run: |
|
|
||||||
echo REPO_NAME=$(echo ${GITHUB_REPOSITORY} | awk -F"/" '{print $2}') >> $GITHUB_OUTPUT
|
|
||||||
echo REPO_VERSION=$(git describe --tags --always | sed 's/^v//') >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: Build and push
|
|
||||||
uses: docker/build-push-action@v4
|
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
file: ./Dockerfile
|
|
||||||
platforms: |
|
|
||||||
linux/amd64
|
|
||||||
linux/arm64
|
|
||||||
push: true
|
|
||||||
tags: | # replace it with your local IP and tags
|
|
||||||
git.beisel.it/${{ env.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}:${{ steps.meta.outputs.REPO_VERSION }}
|
|
||||||
git.beisel.it/${{ env.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}:${{ env.DOCKER_LATEST }}
|
|
||||||
|
|
95
.gitea/workflows/publish-nightly.yml
Normal file
95
.gitea/workflows/publish-nightly.yml
Normal file
@ -0,0 +1,95 @@
|
|||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-deploy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
DOCKER_LATEST: nightly
|
||||||
|
DOCKER_ORG: beisel.org
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout Code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup Docker
|
||||||
|
run: curl -fsSL https://get.docker.com | sh
|
||||||
|
|
||||||
|
- name: Setup Docker BuildX
|
||||||
|
uses: docker/setup-buildx-action@v2
|
||||||
|
with:
|
||||||
|
config-inline: |
|
||||||
|
[registry."https://git.beisel.it"]
|
||||||
|
|
||||||
|
- name: Login to Registry
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
registry: git.beisel.it # replace it with your local IP
|
||||||
|
username: ${{ gitea.actor }}
|
||||||
|
password: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
|
||||||
|
|
||||||
|
- name: Get Meta
|
||||||
|
id: meta
|
||||||
|
run: |
|
||||||
|
echo REPO_NAME=$(echo ${GITHUB_REPOSITORY} | awk -F"/" '{print $2}') >> $GITHUB_OUTPUT
|
||||||
|
echo REPO_VERSION=$(git describe --tags --always | sed 's/^v//') >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: build-docker
|
||||||
|
uses: docker/build-push-action@v4
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: ./Dockerfile
|
||||||
|
platforms: |
|
||||||
|
linux/amd64
|
||||||
|
linux/arm64
|
||||||
|
push: true
|
||||||
|
tags: | # replace it with your local IP and tags
|
||||||
|
git.beisel.it/${{ env.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}:${{ steps.meta.outputs.REPO_VERSION }}
|
||||||
|
git.beisel.it/${{ env.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}:${{ env.DOCKER_LATEST }}
|
||||||
|
|
||||||
|
- name: Set up Go
|
||||||
|
uses: actions/setup-go@v2
|
||||||
|
with:
|
||||||
|
go-version: '1.21' # Specify your Go version
|
||||||
|
|
||||||
|
- name: Build the Binary Version for Linux
|
||||||
|
run: go build -ldflags="-s -w -X 'main.Version=${{ github.ref_name }}'" -o bin/${{ steps.meta.outputs.REPO_NAME }}-${{ github.ref_name }}-linux-amd64
|
||||||
|
|
||||||
|
- name: Build the Binary Version for Windows
|
||||||
|
run: GOOS=windows GOARCH=amd64 go build -ldflags="-s -w -X 'main.Version=${{ github.ref_name }}'" -o bin/${{ steps.meta.outputs.REPO_NAME }}-${{ github.ref_name }}-windows-amd64.exe
|
||||||
|
|
||||||
|
- name: Build the Binary Version for MacOS
|
||||||
|
run: GOOS=darwin GOARCH=amd64 go build -ldflags="-s -w -X 'main.Version=${{ github.ref_name }}'" -o bin/${{ steps.meta.outputs.REPO_NAME }}-${{ github.ref_name }}-darwin-amd64
|
||||||
|
|
||||||
|
- name: Upload a build tagged with the gitref
|
||||||
|
run: |
|
||||||
|
curl --user ${{gitea.actor}}:${{ secrets.PERSONAL_ACCESS_TOKEN }} \
|
||||||
|
--upload-file bin/${{ steps.meta.outputs.REPO_NAME }}-${{ github.ref_name }}-linux-amd64 \
|
||||||
|
https://git.beisel.it/api/packages/${{ env.DOCKER_ORG }}/generic/${{ steps.meta.outputs.REPO_NAME }}/${{ steps.meta.outputs.REPO_VERSION }}/${{ steps.meta.outputs.REPO_NAME }}-${{ github.ref_name }}-linux-amd64
|
||||||
|
|
||||||
|
curl --user ${{gitea.actor}}:${{ secrets.PERSONAL_ACCESS_TOKEN }} \
|
||||||
|
--upload-file bin/${{ steps.meta.outputs.REPO_NAME }}-${{ github.ref_name }}-windows-amd64.exe \
|
||||||
|
https://git.beisel.it/api/packages/${{ env.DOCKER_ORG }}/generic/${{ steps.meta.outputs.REPO_NAME }}/${{ steps.meta.outputs.REPO_VERSION }}/${{ steps.meta.outputs.REPO_NAME }}-${{ github.ref_name }}-windows-amd64.exe
|
||||||
|
|
||||||
|
curl --user ${{gitea.actor}}:${{ secrets.PERSONAL_ACCESS_TOKEN }} \
|
||||||
|
--upload-file bin/${{ steps.meta.outputs.REPO_NAME }}-${{ github.ref_name }}-darwin-amd64 \
|
||||||
|
https://git.beisel.it/api/packages/${{ env.DOCKER_ORG }}/generic/${{ steps.meta.outputs.REPO_NAME }}/${{ steps.meta.outputs.REPO_VERSION }}/${{ steps.meta.outputs.REPO_NAME }}-${{ github.ref_name }}-darwin-amd64
|
||||||
|
|
||||||
|
- name: Delete nightly from generic package registry
|
||||||
|
run: curl --user ${{gitea.actor}}:${{ secrets.PERSONAL_ACCESS_TOKEN }} -X DELETE https://git.beisel.it/api/packages/${{ env.DOCKER_ORG }}/generic/${{ steps.meta.outputs.REPO_NAME }}/${{ env.DOCKER_LATEST }}
|
||||||
|
|
||||||
|
- name: upload nightly
|
||||||
|
run: |
|
||||||
|
curl --user ${{gitea.actor}}:${{ secrets.PERSONAL_ACCESS_TOKEN }} \
|
||||||
|
--upload-file bin/${{ steps.meta.outputs.REPO_NAME }}-${{ github.ref_name }}-linux-amd64 \
|
||||||
|
https://git.beisel.it/api/packages/${{ env.DOCKER_ORG }}/generic/${{ steps.meta.outputs.REPO_NAME }}/${{ env.DOCKER_LATEST }}/${{ steps.meta.outputs.REPO_NAME }}-${{ env.DOCKER_LATEST }}-linux-amd64
|
||||||
|
|
||||||
|
curl --user ${{gitea.actor}}:${{ secrets.PERSONAL_ACCESS_TOKEN }} \
|
||||||
|
--upload-file bin/${{ steps.meta.outputs.REPO_NAME }}-${{ github.ref_name }}-windows-amd64.exe \
|
||||||
|
https://git.beisel.it/api/packages/${{ env.DOCKER_ORG }}/generic/${{ steps.meta.outputs.REPO_NAME }}/${{ env.DOCKER_LATEST }}/${{ steps.meta.outputs.REPO_NAME }}-${{ env.DOCKER_LATEST }}-windows-amd64.exe
|
||||||
|
|
||||||
|
curl --user ${{gitea.actor}}:${{ secrets.PERSONAL_ACCESS_TOKEN }} \
|
||||||
|
--upload-file bin/${{ steps.meta.outputs.REPO_NAME }}-${{ github.ref_name }}-darwin-amd64 \
|
||||||
|
https://git.beisel.it/api/packages/${{ env.DOCKER_ORG }}/generic/${{ steps.meta.outputs.REPO_NAME }}/${{ env.DOCKER_LATEST }}/${{ steps.meta.outputs.REPO_NAME }}-${{ env.DOCKER_LATEST }}-darwin-amd64
|
97
.gitea/workflows/publish-release.yml
Normal file
97
.gitea/workflows/publish-release.yml
Normal file
@ -0,0 +1,97 @@
|
|||||||
|
name: New Release Workflow
|
||||||
|
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
types:
|
||||||
|
- published
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-deploy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
DOCKER_LATEST: latest
|
||||||
|
DOCKER_ORG: beisel.org
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout Code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup Docker
|
||||||
|
run: curl -fsSL https://get.docker.com | sh
|
||||||
|
|
||||||
|
- name: Setup Docker BuildX
|
||||||
|
uses: docker/setup-buildx-action@v2
|
||||||
|
with:
|
||||||
|
config-inline: |
|
||||||
|
[registry."https://git.beisel.it"]
|
||||||
|
|
||||||
|
- name: Login to Registry
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
registry: git.beisel.it # replace it with your local IP
|
||||||
|
username: ${{ gitea.actor }}
|
||||||
|
password: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
|
||||||
|
|
||||||
|
- name: Get Meta
|
||||||
|
id: meta
|
||||||
|
run: |
|
||||||
|
echo REPO_NAME=$(echo ${GITHUB_REPOSITORY} | awk -F"/" '{print $2}') >> $GITHUB_OUTPUT
|
||||||
|
echo REPO_VERSION=$(git describe --tags --always | sed 's/^v//') >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: build-docker
|
||||||
|
uses: docker/build-push-action@v4
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: ./Dockerfile
|
||||||
|
platforms: |
|
||||||
|
linux/amd64
|
||||||
|
linux/arm64
|
||||||
|
push: true
|
||||||
|
tags: | # replace it with your local IP and tags
|
||||||
|
git.beisel.it/${{ env.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}:${{ steps.meta.outputs.REPO_VERSION }}
|
||||||
|
git.beisel.it/${{ env.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}:${{ env.DOCKER_LATEST }}
|
||||||
|
|
||||||
|
- name: Set up Go
|
||||||
|
uses: actions/setup-go@v2
|
||||||
|
with:
|
||||||
|
go-version: '1.21' # Specify your Go version
|
||||||
|
|
||||||
|
- name: Build the Binary Version for Linux
|
||||||
|
run: go build -ldflags="-s -w -X 'main.Version=${{ github.ref_name }}'" -o bin/${{ steps.meta.outputs.REPO_NAME }}-${{ github.ref_name }}-linux-amd64
|
||||||
|
|
||||||
|
- name: Build the Binary Version for Windows
|
||||||
|
run: GOOS=windows GOARCH=amd64 go build -ldflags="-s -w -X 'main.Version=${{ github.ref_name }}'" -o bin/${{ steps.meta.outputs.REPO_NAME }}-${{ github.ref_name }}-windows-amd64.exe
|
||||||
|
|
||||||
|
- name: Build the Binary Version for MacOS
|
||||||
|
run: GOOS=darwin GOARCH=amd64 go build -ldflags="-s -w -X 'main.Version=${{ github.ref_name }}'" -o bin/${{ steps.meta.outputs.REPO_NAME }}-${{ github.ref_name }}-darwin-amd64
|
||||||
|
|
||||||
|
- name: Upload a build tagged with the gitref
|
||||||
|
run: |
|
||||||
|
curl --user ${{gitea.actor}}:${{ secrets.PERSONAL_ACCESS_TOKEN }} \
|
||||||
|
--upload-file bin/${{ steps.meta.outputs.REPO_NAME }}-${{ github.ref_name }}-linux-amd64 \
|
||||||
|
https://git.beisel.it/api/packages/${{ env.DOCKER_ORG }}/generic/${{ steps.meta.outputs.REPO_NAME }}/${{ steps.meta.outputs.REPO_VERSION }}/${{ steps.meta.outputs.REPO_NAME }}-${{ github.ref_name }}-linux-amd64
|
||||||
|
|
||||||
|
curl --user ${{gitea.actor}}:${{ secrets.PERSONAL_ACCESS_TOKEN }} \
|
||||||
|
--upload-file bin/${{ steps.meta.outputs.REPO_NAME }}-${{ github.ref_name }}-windows-amd64.exe \
|
||||||
|
https://git.beisel.it/api/packages/${{ env.DOCKER_ORG }}/generic/${{ steps.meta.outputs.REPO_NAME }}/${{ steps.meta.outputs.REPO_VERSION }}/${{ steps.meta.outputs.REPO_NAME }}-${{ github.ref_name }}-windows-amd64.exe
|
||||||
|
|
||||||
|
curl --user ${{gitea.actor}}:${{ secrets.PERSONAL_ACCESS_TOKEN }} \
|
||||||
|
--upload-file bin/${{ steps.meta.outputs.REPO_NAME }}-${{ github.ref_name }}-darwin-amd64 \
|
||||||
|
https://git.beisel.it/api/packages/${{ env.DOCKER_ORG }}/generic/${{ steps.meta.outputs.REPO_NAME }}/${{ steps.meta.outputs.REPO_VERSION }}/${{ steps.meta.outputs.REPO_NAME }}-${{ github.ref_name }}-darwin-amd64
|
||||||
|
|
||||||
|
- name: Delete latest from generic package registry
|
||||||
|
run: curl --user ${{gitea.actor}}:${{ secrets.PERSONAL_ACCESS_TOKEN }} -X DELETE https://git.beisel.it/api/packages/${{ env.DOCKER_ORG }}/generic/${{ steps.meta.outputs.REPO_NAME }}/${{ env.DOCKER_LATEST }}
|
||||||
|
|
||||||
|
- name: upload latest
|
||||||
|
run: |
|
||||||
|
curl --user ${{gitea.actor}}:${{ secrets.PERSONAL_ACCESS_TOKEN }} \
|
||||||
|
--upload-file bin/${{ steps.meta.outputs.REPO_NAME }}-${{ github.ref_name }}-linux-amd64 \
|
||||||
|
https://git.beisel.it/api/packages/${{ env.DOCKER_ORG }}/generic/${{ steps.meta.outputs.REPO_NAME }}/${{ env.DOCKER_LATEST }}/${{ steps.meta.outputs.REPO_NAME }}-${{ env.DOCKER_LATEST }}-linux-amd64
|
||||||
|
|
||||||
|
curl --user ${{gitea.actor}}:${{ secrets.PERSONAL_ACCESS_TOKEN }} \
|
||||||
|
--upload-file bin/${{ steps.meta.outputs.REPO_NAME }}-${{ github.ref_name }}-windows-amd64.exe \
|
||||||
|
https://git.beisel.it/api/packages/${{ env.DOCKER_ORG }}/generic/${{ steps.meta.outputs.REPO_NAME }}/${{ env.DOCKER_LATEST }}/${{ steps.meta.outputs.REPO_NAME }}-${{ env.DOCKER_LATEST }}-windows-amd64.exe
|
||||||
|
|
||||||
|
curl --user ${{gitea.actor}}:${{ secrets.PERSONAL_ACCESS_TOKEN }} \
|
||||||
|
--upload-file bin/${{ steps.meta.outputs.REPO_NAME }}-${{ github.ref_name }}-darwin-amd64 \
|
||||||
|
https://git.beisel.it/api/packages/${{ env.DOCKER_ORG }}/generic/${{ steps.meta.outputs.REPO_NAME }}/${{ env.DOCKER_LATEST }}/${{ steps.meta.outputs.REPO_NAME }}-${{ env.DOCKER_LATEST }}-darwin-amd64
|
20
.gitea/workflows/test-commits.yml
Normal file
20
.gitea/workflows/test-commits.yml
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
name: Test Changes on Push
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-vet-test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Set up Go
|
||||||
|
uses: actions/setup-go@v2
|
||||||
|
with:
|
||||||
|
go-version: '1.21' # Specify your Go version
|
||||||
|
- name: Build
|
||||||
|
run: go build ./...
|
||||||
|
- name: Vet
|
||||||
|
run: go vet ./...
|
||||||
|
- name: Test
|
||||||
|
run: go test ./...
|
21
LICENSE
Normal file
21
LICENSE
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2024 Florian Beisel
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
109
README.md
Normal file
109
README.md
Normal file
@ -0,0 +1,109 @@
|
|||||||
|
# Gitea account registration Bot for Discord
|
||||||
|
|
||||||
|
This repository contains the source code for a Discord bot that interacts with Gitea to allow user self-registration from
|
||||||
|
within Discord. It's designed to work across multiple platforms, including Docker, Windows, Linux, and macOS.
|
||||||
|
|
||||||
|
## Description
|
||||||
|
|
||||||
|
This Discord bot is designed to react to commands on Discord and interact with the Gitea API to create and manage user
|
||||||
|
accounts. It currently supports the `!register` command to facilitate user registration through Discord.
|
||||||
|
|
||||||
|
## Environment Variables
|
||||||
|
|
||||||
|
The bot requires the following environment variables to be set:
|
||||||
|
|
||||||
|
- `DISCORD_TOKEN`: The token for your Discord bot.
|
||||||
|
- `GITEA_TOKEN`: The API token for accessing Gitea.
|
||||||
|
- `GITEA_URL`: The base URL of your Gitea instance.
|
||||||
|
|
||||||
|
## Build it yourself
|
||||||
|
|
||||||
|
To build the bot from source, follow these steps:
|
||||||
|
|
||||||
|
1. Clone the repository:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git clone https://git.beisel.it/beisel.org/gitea-register-account-bot.git
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Navigate to the cloned directory:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd gitea-register-account-bot
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Build the binary (ensure you have Go installed):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
go build -o gitea-register-account-bot
|
||||||
|
```
|
||||||
|
|
||||||
|
### Creating a Docker Image
|
||||||
|
|
||||||
|
You may also create a Docker image using the provided Dockerfile:
|
||||||
|
|
||||||
|
1. Build the Docker image:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker build -t gitea-register-account-bot:latest .
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Run the Docker container:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker run -d --name gitea-register-account-bot -e DISCORD_TOKEN=your_token -e GITEA_TOKEN=your_token -e GITEA_URL=your_url gitea-register-account-bot:latest
|
||||||
|
```
|
||||||
|
|
||||||
|
## Using the Prebuilt Images and binaries
|
||||||
|
|
||||||
|
We provide versioned as well as nightly builds through our CI/CD pipeline, where `:nightly` refers to an automatic build from
|
||||||
|
the latest commit on the `main` branch. The latest release-version can be found with the `latest` Tag.
|
||||||
|
|
||||||
|
### Using the Prebuilt Docker Image
|
||||||
|
|
||||||
|
To use the prebuilt Docker image:
|
||||||
|
|
||||||
|
1. Pull the `latest` image from the registry:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker pull git.beisel.it/beisel.org/gitea-register-account-bot:latest
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Run the Docker container:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker run -d --name gitea-register-account-bot -e DISCORD_TOKEN=your_token -e GITEA_TOKEN=your_token -e GITEA_URL=your_url git.beisel.it/beisel.org/gitea-register-account-bot:latest
|
||||||
|
```
|
||||||
|
|
||||||
|
### Running Prebuilt Binaries
|
||||||
|
|
||||||
|
Prebuilt binaries for Windows, Linux, and macOS are available in the releases section of this repository.
|
||||||
|
|
||||||
|
To run the binary:
|
||||||
|
|
||||||
|
1. Download the appropriate binary for your system.
|
||||||
|
2. Make it executable (Linux/macOS):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
chmod +x gitea-register-account-bot-nightly-[linux-amd64,darwin-amd64]
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Run the binary:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
DISCORD_TOKEN=your_discord_token GITEA_TOKEN=your_gitea_token GITEA_URL=your_gitea_url ./gitea-register-account-bot-nightly-[linux-amd64,darwin-amd64]
|
||||||
|
```
|
||||||
|
|
||||||
|
For Windows, simply execute the .exe file after setting your environment variables.
|
||||||
|
|
||||||
|
## Contributing
|
||||||
|
|
||||||
|
Contributions to this project are welcome. Please ensure you follow the existing code style.
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
||||||
|
|
||||||
|
## Support
|
||||||
|
|
||||||
|
For support, please open an issue in the repository, or hit me up on the Gitea discord @pacey.
|
Reference in New Issue
Block a user