Skip to content

new deployment stuff #44

new deployment stuff

new deployment stuff #44

Workflow file for this run

name: CI
on:
push:
branches:
- master
workflow_dispatch:
jobs:
build:
name: Build and Publish
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Scala
uses: olafurpg/setup-scala@v14
with:
java-version: "[email protected]"
- name: Coursier cache
uses: coursier/cache-action@v6
- name: Build and Publish
env:
JIB_TARGET_IMAGE_USERNAME: ${{ github.actor }}
JIB_TARGET_IMAGE_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
run: |
sbt -v -Dfile.encoding=UTF-8 jibImageBuild
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: Deploy
env:
DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
run: |
json="$(jq -c '{"image":{"repository": (.image | split(":")[0]), "tag": (.image | split(":")[1]), digest: .imageDigest}}' < target/jib-image.json)"
curl -X POST \
--fail \
-F token=${DEPLOY_TOKEN} \
-F ref=REF_NAME \
-F "variables[TARGET]=website" \
-F "variables[IMAGE_VALUES]=$json" \
https://cubyte.dev/api/v4/projects/373/trigger/pipeline