Skip to content
This repository has been archived by the owner on Jul 24, 2023. It is now read-only.

Merge pull request #189 from ictsc/feature/add_scoring_index_page_uni… #71

Merge pull request #189 from ictsc/feature/add_scoring_index_page_uni…

Merge pull request #189 from ictsc/feature/add_scoring_index_page_uni… #71

name: build_prod_image
on:
push:
branches:
- main
jobs:
build_and_push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
env:
REGISTRY: ghcr.io
IMAGE_NAME: ictsc-sachiko-v3
steps:
- name: checkout
uses: actions/checkout@v3
- name: Set tags
uses: docker/metadata-action@v4
id: image-tag
with:
images: ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}
tags: |
type=raw,value=latest
type=sha,prefix=,format=short
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v3
with:
context: ./
build-args: |
next_public_api_url=https://contest.ictsc.net/api
next_public_answer_limit=20
next_public_site_name=${{ secrets.SITE_NAME }}
next_public_rule=${{ secrets.RULE }}
next_public_short_rule=${{ secrets.SHORT_RULE }}
next_public_recreate_rule=${{ secrets.RECREATE_RULE }}
push: true
tags: ${{ steps.image-tag.outputs.tags }}
cache-from: type=gha
cache-to: type=gha,mode=max