Skip to content

v3 full demo: reworked skin, login system, and scores (#91) #1

v3 full demo: reworked skin, login system, and scores (#91)

v3 full demo: reworked skin, login system, and scores (#91) #1

Workflow file for this run

name: Release
## workflow will trigger on commit to "main" branch only
on:
workflow_dispatch:
push:
branches:
- main
env:
GITHUB_REGISTRY_URL: ghcr.io
GITHUB_CONTAINER_NAME: ArcaneReveal/cardinal
GO_VERSION: 1.22.1
jobs:
build:
name: World Engine - Cardinal Build
runs-on: ubuntu-latest
defaults:
run:
shell: bash
working-directory: world-engine
# Add "id-token" with the intended permissions.
permissions:
contents: read
id-token: write
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Golang
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Set SHA_SHORT outputs
id: vars
run:
echo "sha_short=$(echo ${{ github.sha }} | cut -c1-7)" >> $GITHUB_OUTPUT
## Login into GCR / Github Packages
- name: Docker - Auth to Github Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.GITHUB_REGISTRY_URL }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
## Execute makefile
- name: Run Make
working-directory: world-engine/cardinal
run: make
## Build Cardinal dockerfile
- name: Cardinal Build
run: |
# Build container image
# Image name: ghcr.io/FranklinDAO-Dev-Team/ArcaneReveal/cardinal:{sha_hort}
docker build -t ${{ env.GITHUB_REGISTRY_URL }}/${{ github.repository_owner }}/${{ env.GITHUB_CONTAINER_NAME }}:${{ steps.vars.outputs.sha_short }} .
## Push build image to GCR / Github Packages
- name: Docker - Publish Image to Github Container Registry
run: |
docker push ${{ env.GITHUB_REGISTRY_URL }}/${{ github.repository_owner }}/${{ env.GITHUB_CONTAINER_NAME }}:${{ steps.vars.outputs.sha_short }}