Skip to content

Merge pull request #14 from PascalHonegger/latest-and-greatest #37

Merge pull request #14 from PascalHonegger/latest-and-greatest

Merge pull request #14 from PascalHonegger/latest-and-greatest #37

Workflow file for this run

name: JassTracker Operations
on:
push:
branches:
- main
tags:
- v*.*.*
pull_request:
branches:
- main
jobs:
build-image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 21
cache: gradle
- uses: pnpm/action-setup@v2
with:
package_json_file: Frontend/package.json
- uses: actions/setup-node@v3
with:
node-version: 20
cache: pnpm
cache-dependency-path: Frontend/pnpm-lock.yaml
- run: pnpm i
working-directory: Frontend
- name: Build Frontend
run: pnpm build
working-directory: Frontend
- name: Build Backend
run: ./gradlew --no-daemon shadowJar
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ github.token }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/pascalhonegger/jasstracker
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=ref,event=pr
- name: Build and push container images
uses: docker/build-push-action@v5
with:
file: DockerfileBuiltLocally
context: .
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name == 'push' && contains(github.ref, 'refs/tags/') }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}