Skip to content

v2.8.19

v2.8.19 #34

Workflow file for this run

name: Deploy Release
on:
release:
types:
- released
env:
RUMPEL: live
RUMPEL_ALT: latest
RUMPEL_BUCKET: hubofallthings-net-frontend-build-artifacts
jobs:
build:
name: Build
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: recursive
- name: Cache - GHA
uses: actions/cache@v2
with:
path: ~/.cache/coursier/v1/https
key: ${{ runner.OS }}-coursier-cache
- name: Cache - Resolvers
run: curl https://${{ secrets.ARTIFACTS_CACHE_BUCKET }}/resolvers.sbt --create-dirs -o ~/.sbt/resolvers.sbt
- name: Setup Java
uses: actions/[email protected]
with:
distribution: adopt
java-version: 11
java-package: jdk
architecture: x64
- name: App - Frontend
env:
AWS_ACCESS_KEY_ID: ${{ secrets.DEPLOYER_MASTER_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.DEPLOYER_MASTER_SECRET_ACCESS_KEY }}
run: |
cd ./hat/app/org/hatdex/hat/phata/assets/
aws s3 cp s3://${{ env.RUMPEL_BUCKET }}/${{ env.RUMPEL }} rumpel --recursive --region eu-west-1
aws s3 cp s3://${{ env.RUMPEL_BUCKET }}/${{ env.RUMPEL_ALT }} alt-rumpel --recursive --region eu-west-1
cp rumpel/*.js* js/
cp rumpel/*.css stylesheets/
gzip --keep --force js/*.bundle.js
cp -r rumpel/assets/* .
cp -r alt-rumpel/* .
rm -r rumpel
rm -r alt-rumpel
cd -
- name: App - Build
run: sbt Docker/stage
- name: Container - Setup QEMU
uses: docker/setup-qemu-action@v1
- name: Container - Setup Buildx
uses: docker/setup-buildx-action@v1
- name: Container - Login DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_DATASWIFT_USER }}
password: ${{ secrets.DOCKERHUB_DATASWIFT_PASS }}
- name: Container - Login GitHub
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ secrets.BOT_GITHUB_NAME }}
password: ${{ secrets.BOT_GITHUB_TOKEN }}
- name: Container - Meta
id: meta
uses: docker/metadata-action@v3
with:
images: |
dataswift/hat
ghcr.io/dataswift/hat
tags: |
type=raw,value=latest
type=semver,prefix=v,pattern={{version}}
type=semver,prefix=v,pattern={{major}}
type=semver,prefix=v,pattern={{major}}.{{minor}}
- name: Container - Build & Push
uses: docker/build-push-action@v2
with:
push: true
context: hat/target/docker/stage
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64
cache-from: type=registry,ref=ghcr.io/datasiwft/hat:latest
- name: Slack
uses: lazy-actions/slatify@master
if: failure()
with:
type: ${{ job.status }}
job_name: "*${{ env.GITHUB_WORKFLOW }}*"
channel: "ci"
commit: true
mention: "here"
mention_if: "failure"
token: ${{ secrets.GITHUB_TOKEN }}
url: ${{ secrets.SLACK_WEBHOOK_URL }}