Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
690a1d3f33 |
No files matched your search
+56
-64
@@ -10,21 +10,16 @@ on:
|
||||
branches:
|
||||
- "main"
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
package:
|
||||
name: Package
|
||||
runs-on: ubuntu-26.04
|
||||
timeout-minutes: 15
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
||||
|
||||
- name: Set up JDK
|
||||
uses: actions/setup-java@b843ebf9b913146b38da2eaa7aeddf76074ae1ad # v6
|
||||
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '25'
|
||||
@@ -37,7 +32,7 @@ jobs:
|
||||
|
||||
- name: Upload test reports
|
||||
if: always()
|
||||
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
|
||||
uses: actions/upload-artifact@c6a366c94c3e0affe28c06c8df20a878f24da3cf # v3
|
||||
with:
|
||||
name: junit-reports
|
||||
path: |
|
||||
@@ -45,7 +40,7 @@ jobs:
|
||||
if-no-files-found: ignore
|
||||
|
||||
- name: Upload Maven artifacts
|
||||
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
|
||||
uses: actions/upload-artifact@c6a366c94c3e0affe28c06c8df20a878f24da3cf # v3
|
||||
with:
|
||||
name: maven-artifacts
|
||||
path: |
|
||||
@@ -53,68 +48,24 @@ jobs:
|
||||
startup.sh
|
||||
if-no-files-found: error
|
||||
|
||||
maven-publish:
|
||||
name: Publish Maven Package
|
||||
runs-on: ubuntu-26.04
|
||||
timeout-minutes: 15
|
||||
docker-main:
|
||||
name: Docker Build and Push (main)
|
||||
runs-on: ubuntu-latest
|
||||
needs: package
|
||||
if: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')) }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
|
||||
- name: Set up JDK
|
||||
uses: actions/setup-java@b843ebf9b913146b38da2eaa7aeddf76074ae1ad # v6
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '25'
|
||||
cache: 'maven'
|
||||
server-id: gitea
|
||||
server-username: REGISTRY_USER
|
||||
server-password: REGISTRY_PASSWORD
|
||||
|
||||
- name: Publish Maven package
|
||||
run: |
|
||||
chmod +x ./mvnw
|
||||
./mvnw --batch-mode deploy -DskipTests
|
||||
env:
|
||||
REGISTRY_USER: ${{ secrets.REGISTRY_USER }}
|
||||
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
|
||||
|
||||
docker:
|
||||
name: Docker Build and Push
|
||||
runs-on: ubuntu-26.04
|
||||
timeout-minutes: 15
|
||||
needs: package
|
||||
if: ${{ github.event_name == 'push' }}
|
||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
||||
|
||||
- name: Download build artifacts
|
||||
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8
|
||||
uses: actions/download-artifact@a9bc5e6ef2cb54c177f32aa5726adaa15e7e2d59 # v3
|
||||
with:
|
||||
name: maven-artifacts
|
||||
path: .
|
||||
|
||||
- name: Compute Docker tags
|
||||
id: meta
|
||||
shell: bash
|
||||
run: |
|
||||
REGISTRY="${{ secrets.REGISTRY_URL }}/${{ secrets.REGISTRY_USER }}/netneutrality"
|
||||
if [[ "$GITHUB_REF" == refs/tags/* ]]; then
|
||||
ver="${GITHUB_REF_NAME#v}"
|
||||
echo "tags=${REGISTRY}:${ver},${REGISTRY}:latest" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "tags=${REGISTRY}:main" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v4
|
||||
|
||||
- name: Log in to registry
|
||||
uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # v4
|
||||
with:
|
||||
@@ -122,12 +73,53 @@ jobs:
|
||||
username: ${{ secrets.REGISTRY_USER }}
|
||||
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||
|
||||
- name: Build and push
|
||||
- name: Build and push (main)
|
||||
uses: docker/build-push-action@d08e5c354a6adb9ed34480a06d141179aa583294 # v7
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
cache-from: type=registry,ref=${{ secrets.REGISTRY_URL }}/${{ secrets.REGISTRY_USER }}/netneutrality:buildcache
|
||||
cache-to: type=registry,ref=${{ secrets.REGISTRY_URL }}/${{ secrets.REGISTRY_USER }}/netneutrality:buildcache,mode=max
|
||||
tags: "${{ secrets.REGISTRY_URL }}/${{ secrets.REGISTRY_USER }}/netneutrality:main"
|
||||
|
||||
docker-release:
|
||||
name: Docker Build and Push (release)
|
||||
runs-on: ubuntu-latest
|
||||
needs: package
|
||||
if: ${{ startsWith(github.ref, 'refs/tags/') }}
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
||||
|
||||
- name: Download build artifacts
|
||||
uses: actions/download-artifact@a9bc5e6ef2cb54c177f32aa5726adaa15e7e2d59 # v3
|
||||
with:
|
||||
name: maven-artifacts
|
||||
path: .
|
||||
|
||||
- name: Compute release version
|
||||
id: rel
|
||||
shell: bash
|
||||
run: |
|
||||
# Strip leading 'v' if present (e.g., v1.2.3 -> 1.2.3)
|
||||
ver="${GITHUB_REF_NAME#v}"
|
||||
echo "version=$ver" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Log in to registry
|
||||
uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # v4
|
||||
with:
|
||||
registry: ${{ secrets.REGISTRY_URL }}
|
||||
username: ${{ secrets.REGISTRY_USER }}
|
||||
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||
|
||||
- name: Build and push (release + latest)
|
||||
uses: docker/build-push-action@d08e5c354a6adb9ed34480a06d141179aa583294 # v7
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile
|
||||
push: true
|
||||
tags: |
|
||||
${{ secrets.REGISTRY_URL }}/${{ secrets.REGISTRY_USER }}/netneutrality:${{ steps.rel.outputs.version }}
|
||||
${{ secrets.REGISTRY_URL }}/${{ secrets.REGISTRY_USER }}/netneutrality:latest
|
||||
+1
-1
@@ -32,7 +32,7 @@ services:
|
||||
MYSQL_PASSWORD: password
|
||||
MYSQL_DATABASE: netneutrality
|
||||
ejs-api:
|
||||
image: ghcr.io/kikkia/yt-cipher:master@sha256:4c5ec381ff57336cfc24822d2b526a5ad7cd0171f61065a1bbc87bb736842449
|
||||
image: ghcr.io/kikkia/yt-cipher:master@sha256:4fbb0d94cb4b9d2e5028986853825921d8c30975c0d948391fb9f4c7bf8520f6
|
||||
container_name: ejs_signature_api
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
|
||||
@@ -11,13 +11,6 @@
|
||||
<description>Discord bot</description>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
<id>gitea</id>
|
||||
<url>https://gitea.bobert.me/api/packages/anthorob/maven</url>
|
||||
</repository>
|
||||
</distributionManagement>
|
||||
|
||||
<properties>
|
||||
<main.class>me.bobert.netneutrality.NetNeutrality</main.class>
|
||||
<java.version>25</java.version>
|
||||
@@ -49,7 +42,7 @@
|
||||
<plugin>
|
||||
<groupId>org.flywaydb</groupId>
|
||||
<artifactId>flyway-maven-plugin</artifactId>
|
||||
<version>11.20.3</version>
|
||||
<version>13.3.0</version>
|
||||
<configuration>
|
||||
<url>${env.FLYWAY_URL}</url>
|
||||
<user>${env.FLYWAY_USER}</user>
|
||||
@@ -143,7 +136,7 @@
|
||||
<repository>
|
||||
<id>arbjergDev-releases</id>
|
||||
<name>Lavalink Repository</name>
|
||||
<url>https://maven.lavalink.dev/snapshots</url>
|
||||
<url>https://maven.lavalink.dev/releases</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
@@ -161,7 +154,7 @@
|
||||
<dependency>
|
||||
<groupId>dev.lavalink.youtube</groupId>
|
||||
<artifactId>v2</artifactId>
|
||||
<version>f45bbb7aebfcbc1c553769e04af6cd43afa8b7c3-SNAPSHOT</version>
|
||||
<version>1.18.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>club.minnced</groupId>
|
||||
@@ -208,12 +201,12 @@
|
||||
<dependency>
|
||||
<groupId>org.flywaydb</groupId>
|
||||
<artifactId>flyway-core</artifactId>
|
||||
<version>11.20.3</version>
|
||||
<version>13.3.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.flywaydb</groupId>
|
||||
<artifactId>flyway-mysql</artifactId>
|
||||
<version>11.20.3</version>
|
||||
<version>13.3.0</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
Reference in new issue
Block a user