Improvements around smithy classpath configuration #67
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: Continuous Integration | |
on: | |
pull_request: | |
branches: ["**"] | |
push: | |
branches: ["main"] | |
jobs: | |
build: | |
name: Build and Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout current branch (full) | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: "17.6.0" | |
- name: Setup Java | |
uses: actions/setup-java@v3 | |
with: | |
distribution: temurin | |
java-version: 17 | |
cache: sbt | |
- run: sbt "test" | |
- run: ./scripts/build-image.sh | |
env: | |
PUBLISH_OFFICIAL: "false" | |
- name: Compress target directories | |
run: tar cf targets.tar target project/target | |
- name: Upload target directories | |
uses: actions/upload-artifact@v3 | |
with: | |
name: target-ubuntu-latest-temurin-17 | |
path: targets.tar | |
deploy: | |
needs: build | |
name: Deploy app | |
if: github.ref == 'refs/heads/main' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout current branch (full) | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: "17.6.0" | |
- name: Setup Java | |
uses: actions/setup-java@v3 | |
with: | |
distribution: temurin | |
java-version: 17 | |
cache: sbt | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: daddykotex | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- uses: superfly/flyctl-actions/setup-flyctl@master | |
- run: flyctl auth docker | |
env: | |
FLY_API_TOKEN: ${{ secrets.FLY_TOKEN }} | |
- run: ./scripts/build-image.sh | |
env: | |
PUBLISH_OFFICIAL: "true" | |
- run: flyctl deploy --remote-only | |
env: | |
FLY_API_TOKEN: ${{ secrets.FLY_TOKEN }} |