build(deps): bump org.springframework.boot from 3.3.0 to 3.3.1 (#65) #154
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
types: [ opened, synchronize, reopened ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Java JDK | |
uses: actions/setup-java@v3.0.0 | |
with: | |
java-version: 17 | |
distribution: adopt | |
- name: Setup gradlew | |
run: chmod +x ./gradlew | |
- name: Cache Gradle | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.gradle/wrapper | |
~/.gradle/caches | |
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }} | |
restore-keys: | | |
${{ runner.os }}-gradle-caches- | |
- name: Compile | |
run: ./gradlew classes | |
- name: Unit Test | |
run: ./gradlew test --stacktrace | |
- name: Integration Test | |
env: | |
BOT_TOKEN: ${{ secrets.TEST_BOT_TOKEN }} | |
run: ./gradlew itest --stacktrace | |
- name: Build | |
run: ./gradlew build -x test | |
- name: Boot Jar | |
run: ./gradlew clean bootJar | |
- name: Upload Boot Jar | |
uses: actions/upload-artifact@v3 | |
with: | |
name: birthday-discord-bot | |
path: build/libs/birthday-discord-bot*.jar | |
docker-dev: | |
runs-on: ubuntu-latest | |
needs: build | |
if: github.event_name == 'push' | |
permissions: | |
contents: read | |
packages: write | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: ${{ github.repository }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Log in to the Container registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Extract metadata (tags, labels) for Docker | |
id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
build-args: | | |
buildNumber=${{ github.run_number }} | |
buildHash=${{ github.sha }} |