ClaptrapBot/.github/workflows/build.yml

79 lines
1.8 KiB
YAML
Raw Normal View History

2020-04-12 17:20:46 +02:00
# This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
2020-04-12 18:57:37 +02:00
name: Build
2020-04-12 17:20:46 +02:00
on:
push:
Ui Rebuild (#199) * Cleanup * Build auth provider * Implement discord login * Add jwt service + add liquibase * :hammer: Add jwt filter * :hammer: Update user info in db on login * :hammer: Add swagger * :hammer: Add dev container * :hammer: Add dev container * :hammer: Fix changelog ? * :hammer: Fix openApi * :hammer: Add guildcontroller with getMutualGuilds * :hammer: Change multual guilds url * :hammer: Add invite link api * :hammer: migrate env to config prop * :lock: Add security expression for guild * :lock: Add dev mode to auth * :hammer: Add textchannel and voicechannel endpoint * :hammer: Add setting description endpoint * :hammer: Add getRole endpoint * :hammer: Return only visible voice/text channels * :hammer: Add value endpoint * :robot: Change ci * :hammer: Add canManage to guild list * :ambulance: Load user of guild on load + fetch on api call for mutuals guilds * :ambulance: Fix auto_voice_channel_title type * :ambulance: Fix swagger url * :ambulance: Fix setting type * :hammer: Add setting post * Fix blanck string in db * :hammer: Add music status api enpoint * :ambulance: Fix permission * :hammer: Change interact condition * :hammer: Add connect api command * :hammer: Add disconnect endpoint * :hammer: Audio refracto * :hammer: Big refracto * :hammer: Refracto libs * :hammer: Rebuild http request with new client * :hammer: Refracto + add skip, pause, resume, stop endpoint * :hammer: Add endpoint * :ambulance: Fix permission * Update build.yml * Update plugin org.liquibase.gradle to v2.1.1 [skip ci] (#186) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update plugin nebula.lint to v16.26.0 [skip ci] (#185) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update dependency org.liquibase:liquibase-core to v4.12.0 [skip ci] (#184) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update dependency org.liquibase.ext:liquibase-hibernate5 to v4.12.0 [skip ci] (#183) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update actions/checkout action to v3 [skip ci] (#187) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update actions/download-artifact action to v3 [skip ci] (#188) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * :ambulance: Fix permission * Update tj-actions/branch-names action to v5.3 [skip ci] (#195) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update plugin nebula.lint to v17 [skip ci] (#194) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update docker/setup-buildx-action action to v2 [skip ci] (#193) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update docker/login-action action to v2 [skip ci] (#192) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update docker/build-push-action action to v3 [skip ci] (#191) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update dependency openjdk to v18 [skip ci] (#190) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update actions/setup-java action to v3 [skip ci] (#189) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Clean for release * :arrow_up: Update dependency org.apache.logging.log4j:log4j-bom to v2.17.2 (#198) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * :arrow_up: Update dependency com.sedmelluq:lavaplayer to v1.3.78 (#197) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-06-30 18:36:21 +02:00
branches-ignore:
- "renovate/**"
tags-ignore:
- "**"
2020-04-12 17:20:46 +02:00
jobs:
build-gradle:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
2021-02-18 15:21:59 +01:00
2022-05-15 16:40:00 +02:00
- name: Set up JDK 17
uses: actions/setup-java@v4
2020-04-12 17:20:46 +02:00
with:
Ui Rebuild (#199) * Cleanup * Build auth provider * Implement discord login * Add jwt service + add liquibase * :hammer: Add jwt filter * :hammer: Update user info in db on login * :hammer: Add swagger * :hammer: Add dev container * :hammer: Add dev container * :hammer: Fix changelog ? * :hammer: Fix openApi * :hammer: Add guildcontroller with getMutualGuilds * :hammer: Change multual guilds url * :hammer: Add invite link api * :hammer: migrate env to config prop * :lock: Add security expression for guild * :lock: Add dev mode to auth * :hammer: Add textchannel and voicechannel endpoint * :hammer: Add setting description endpoint * :hammer: Add getRole endpoint * :hammer: Return only visible voice/text channels * :hammer: Add value endpoint * :robot: Change ci * :hammer: Add canManage to guild list * :ambulance: Load user of guild on load + fetch on api call for mutuals guilds * :ambulance: Fix auto_voice_channel_title type * :ambulance: Fix swagger url * :ambulance: Fix setting type * :hammer: Add setting post * Fix blanck string in db * :hammer: Add music status api enpoint * :ambulance: Fix permission * :hammer: Change interact condition * :hammer: Add connect api command * :hammer: Add disconnect endpoint * :hammer: Audio refracto * :hammer: Big refracto * :hammer: Refracto libs * :hammer: Rebuild http request with new client * :hammer: Refracto + add skip, pause, resume, stop endpoint * :hammer: Add endpoint * :ambulance: Fix permission * Update build.yml * Update plugin org.liquibase.gradle to v2.1.1 [skip ci] (#186) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update plugin nebula.lint to v16.26.0 [skip ci] (#185) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update dependency org.liquibase:liquibase-core to v4.12.0 [skip ci] (#184) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update dependency org.liquibase.ext:liquibase-hibernate5 to v4.12.0 [skip ci] (#183) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update actions/checkout action to v3 [skip ci] (#187) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update actions/download-artifact action to v3 [skip ci] (#188) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * :ambulance: Fix permission * Update tj-actions/branch-names action to v5.3 [skip ci] (#195) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update plugin nebula.lint to v17 [skip ci] (#194) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update docker/setup-buildx-action action to v2 [skip ci] (#193) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update docker/login-action action to v2 [skip ci] (#192) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update docker/build-push-action action to v3 [skip ci] (#191) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update dependency openjdk to v18 [skip ci] (#190) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update actions/setup-java action to v3 [skip ci] (#189) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Clean for release * :arrow_up: Update dependency org.apache.logging.log4j:log4j-bom to v2.17.2 (#198) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * :arrow_up: Update dependency com.sedmelluq:lavaplayer to v1.3.78 (#197) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-06-30 18:36:21 +02:00
distribution: 'temurin'
2022-05-15 16:40:00 +02:00
java-version: 17
2021-02-18 15:21:59 +01:00
2020-04-12 17:20:46 +02:00
- name: Grant execute permission for gradlew
run: chmod +x gradlew
2021-02-18 15:21:59 +01:00
2020-04-12 17:20:46 +02:00
- name: Build with Gradle
run: ./gradlew build
2021-02-18 15:21:59 +01:00
2020-04-12 17:20:46 +02:00
- name: Upload Jar File
uses: actions/upload-artifact@v2-preview
with:
name: claptrap_jar
path: build/libs/
2021-02-16 12:30:04 +01:00
2020-04-12 17:20:46 +02:00
build-docker:
2022-05-15 16:40:00 +02:00
runs-on: ubuntu-latest
needs:
- build-gradle
2020-04-12 17:20:46 +02:00
steps:
- uses: actions/checkout@v4
2021-02-18 15:21:59 +01:00
2020-04-12 17:20:46 +02:00
- name: Download artifact
uses: actions/download-artifact@v3.0.2
2020-04-12 17:20:46 +02:00
with:
# Artifact name
name: claptrap_jar
# Destination path
path: build/libs/
2021-02-18 15:21:59 +01:00
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
2021-02-18 15:21:59 +01:00
- name: Login to ghcr.io
uses: docker/login-action@v3
2021-02-18 15:21:59 +01:00
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.CR_PAT }}
2022-06-29 16:43:29 +02:00
- name: Get branch name
id: branch-name
uses: tj-actions/branch-names@v5.4
2022-06-29 16:43:29 +02:00
- name: Set tag
run: |
echo "tag=${{ steps.branch-name.outputs.current_branch }}" >> $GITHUB_ENV
2021-02-18 15:21:59 +01:00
- name: Build and push Docker
uses: docker/build-push-action@v5
2020-04-12 17:20:46 +02:00
with:
2021-02-18 15:21:59 +01:00
push: true
context: .
2022-06-29 16:43:29 +02:00
tags: "ghcr.io/sebclem/claptrapbot:${{ env.tag }}"
file: ./Dockerfile