From 7673c258485ac30e8226095e23957b9827690e51 Mon Sep 17 00:00:00 2001 From: oat9002 Date: Wed, 25 Dec 2024 15:41:47 +0700 Subject: [PATCH] update github action --- .github/workflows/docker.yml | 1 + .github/workflows/pr_build.yml | 3 +++ .github/workflows/release.yml | 10 +--------- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 7a8bccb..a9ee6d1 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -37,6 +37,7 @@ jobs: export VERSION=$(cat version.sbt | cut -d '"' -f2 | sed 's/-SNAPSHOT//g') echo "version: $VERSION" echo "::set-output name=APP_VERSION::$VERSION" + - uses: sbt/setup-sbt@v1 - name: Create Dockerfile run: sbt "Docker / stage" - name: Publish to Docker Hub diff --git a/.github/workflows/pr_build.yml b/.github/workflows/pr_build.yml index e711b13..c4f1771 100644 --- a/.github/workflows/pr_build.yml +++ b/.github/workflows/pr_build.yml @@ -22,6 +22,7 @@ jobs: run: | git config --global user.name "github-actions[bot]" git config --global user.email "github-actions[bot]@users.noreply.github.com" + - uses: sbt/setup-sbt@v1 - name: Format code run: | sbt scalafmtAll @@ -49,6 +50,7 @@ jobs: with: distribution: 'temurin' java-version: '21' + - uses: sbt/setup-sbt@v1 - name: Clean and Compile run: sbt clean compile @@ -62,6 +64,7 @@ jobs: with: distribution: 'temurin' java-version: '21' + - uses: sbt/setup-sbt@v1 - name: Test run: sbt test diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 160bbb0..b3ad426 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,6 +24,7 @@ jobs: run: | git config --global user.name 'github-actions[bot]' git config --global user.email 'github-actions[bot]@users.noreply.github.com' + - uses: sbt/setup-sbt@v1 - name: Release run: sbt "release with-defaults" env: @@ -50,13 +51,4 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} tag: ${{ steps.get-latest-tag.outputs.LATEST_TAG }} -# -# deploy: -# needs: dockerPublish -# runs-on: ubuntu-latest -# steps: -# - uses: actions/checkout@v4 -# - name: Deploy to server -# run: | -# curl ${{ secrets.SERVER_URL }} -H "X-Api-Key: ${{ secrets.DEPLOY_API_KEY }}"