Skip to content

Combined ELO for 2v2. Best teams for 2v2. Fixed env for cron. #11

Combined ELO for 2v2. Best teams for 2v2. Fixed env for cron.

Combined ELO for 2v2. Best teams for 2v2. Fixed env for cron. #11

Workflow file for this run

name: Build
on:
workflow_dispatch:
push:
branches:
- 'main'
tags:
- 'v*'
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
matrix:
target: [app, cron]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Extract metadata (tags, labels)
id: meta
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/${{ github.repository_owner }}/cncnet-ladder-elo-computation-${{ matrix.target }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=raw,value=latest,enable={{is_default_branch}}
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push base image
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile
target: ${{ matrix.target }}
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}