chore(build): login to registry #4
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: Release | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build-server: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- uses: docker/setup-buildx-action@v2 | |
- name: Login to ghcr.io | |
uses: docker/#-action@v3 | |
with: | |
username: updraft0 | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Setup JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '21' | |
cache: 'sbt' | |
- name: Build and Test | |
run: sbt server/docker:publish | |
build-frontend: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./ui/ | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- uses: docker/setup-buildx-action@v2 | |
- name: Login to ghcr.io | |
uses: docker/#-action@v3 | |
with: | |
username: updraft0 | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Setup JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '21' | |
cache: 'sbt' | |
- name: Set up Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
cache: 'npm' | |
cache-dependency-path: './ui' | |
- name: Install dependencies | |
run: npm install | |
- name: Build | |
run: npm run build | |
- name: Push to container registry | |
uses: docker/build-push-action@v5 | |
with: | |
context: dist/ | |
file: "Dockerfile.nginx" | |
tags: controltower-fe:latest | |
load: true | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
push: false |