Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[build]
rustflags = ["-Wunused-crate-dependencies"]
38 changes: 25 additions & 13 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,18 +1,30 @@
# required
###################################################################################################
# database config
POSTGRES_DB=starboard
POSTGRES_USER=starboard
POSTGRES_PASSWORD=starboard

###################################################################################################
# runtime config
RUST_LOG=twilight_http_ratelimiting=debug,info
DEVELOPMENT=true

DISCORD_TOKEN=
SB_DATABASE_URL=postgresql://host.docker.internal/DB_NAME?user=DB_USER&password=DB_PASSWORD

SHARDS=1
# true disables notifications
DEVELOPMENT=true
BOT_ID=

# optional
OWNER_IDS=OWNER_ID_1, OWNER_ID_2
SB_DATABASE_URL=postgres://starboard:starboard@127.0.0.1:5432/starboard
SB_MAX_DB_CONNECTIONS=10

#OWNER_IDS=ID1,ID2
BOT_ID=
#MAIN_GUILD=
#ERROR_CHANNEL_ID=
#PATRON_ROLE=
#SUPPORTER_ROLE=

PATREON_TOKEN=
SENTRY_URL=
#PATREON_TOKEN=

MAIN_GUILD=
ERROR_CHANNEL_ID=
PATRON_ROLE=
SUPPORTER_ROLE=
###################################################################################################
# build config
#DATABASE_URL=${SB_DATABASE_URL}
2 changes: 0 additions & 2 deletions .gitattributes

This file was deleted.

70 changes: 70 additions & 0 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: cicd

on:
pull_request:
release:
types: [published]
workflow_dispatch:

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
check:
if: github.event_name == 'pull_request' || github.event_name == 'release'
runs-on: ubuntu-latest
env:
SQLX_OFFLINE: "true"
steps:
- uses: actions/checkout@v7
- uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
- uses: dtolnay/rust-toolchain@master
with:
toolchain: "1.97"
components: clippy
- uses: Swatinem/rust-cache@v2
- uses: extractions/setup-just@v4
- uses: j178/prek-action@v2
with:
install-only: true
- run: just check

publish:
needs: [check]
if: >-
!cancelled() &&
(github.event_name == 'workflow_dispatch' ||
(github.event_name == 'release' && needs.check.result == 'success'))
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: docker/setup-buildx-action@v4
- uses: docker/login-action@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- id: meta
uses: docker/metadata-action@v6
with:
images: circuitsacul/starboard
tags: |
type=raw,value=${{ github.event.release.tag_name }},enable=${{ github.event_name == 'release' }}
type=raw,value=latest,enable=${{ github.event_name == 'release' && !github.event.release.prerelease }}
type=raw,value=dev,enable=${{ github.event_name == 'workflow_dispatch' }}
type=sha,prefix=dev-,format=short,enable=${{ github.event_name == 'workflow_dispatch' }}
flavor: |
latest=false
- uses: docker/build-push-action@v7
with:
context: .
file: ./Containerfile
platforms: linux/amd64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
36 changes: 0 additions & 36 deletions .github/workflows/publish-docker-image.yml

This file was deleted.

9 changes: 1 addition & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
.env
.vscode

# Generated by Cargo
# will have compiled files and executables
# generated
debug/
target/

# These are backup files generated by rustfmt
**/*.rs.bk

# MSVC Windows builds of rustc generate these, which store debugging information
*.pdb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading