This repository was archived by the owner on Feb 20, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (70 loc) · 2.49 KB
/
scala.yml
File metadata and controls
83 lines (70 loc) · 2.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: Scala CI
on:
push:
branches: [ main, MVP ]
pull_request:
branches: [ main, MVP ]
workflow_dispatch:
jobs:
check-build-test-publish-deploy:
name: Check, Build, Test, Publish to gcr.io, Deploy to Kalix
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set Up JDK 17
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'temurin'
- name: Coursier Caching
uses: coursier/cache-action@v6
# - name: Run scalafmt via sbt
# run: sbt scalafmtSbtCheck scalafmtCheck test:scalafmtCheck
- name: Authorize to GCP
uses: 'google-github-actions/auth@v0'
with:
credentials_json: '${{ secrets.GCP_SERVICE_ACCOUNT_KEY }}'
# Setup gcloud CLI
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v0
- name: Authorize Docker In Locations
run: |
gcloud auth configure-docker us-east1-docker.pkg.dev
- name: Build & Test All Projects
run: |
sbt -v clean test
- name: kalix-service publish with sbt
run: |
sbt -v gateway/packageBin gateway/Docker/publish
- name: Cleanup Before Caching
shell: bash
run: |
rm -rf "$HOME/.ivy2/local" || true
find $HOME/Library/Caches/Coursier/v1 -name "ivydata-*.properties" -delete || true
find $HOME/.ivy2/cache -name "ivydata-*.properties" -delete || true
find $HOME/.cache/coursier/v1 -name "ivydata-*.properties" -delete || true
find $HOME/.sbt -name "*.lock" -delete || true
- name: Kalix Deploy
uses: lightbend/kalix-action@v5
with:
cmd: "services deploy gateway ${{ secrets.REPO_HOST }}/improving-app-gateway:latest"
env:
token: ${{ secrets.KALIX_TOKEN }}
project: ${{ secrets.KALIX_PROJECT_ID }}
# slack-workflow-status:
# if: always()
# name: Post Workflow Status To Slack
# needs:
# - build
# runs-on: ubuntu-latest
# steps:
# - name: Slack Workflow Notification
# uses: Gamesight/slack-workflow-status@master
# with:
# # Required Input
# repo_token: ${{secrets.API_TOKEN}}
# slack_webhook_url: ${{secrets.SLACK_WEBHOOK}}
# # Optional Input
# channel: '#improving-app-notifications'
# name: 'GitHub Workflow'