Coerce types to match when dealing with ties
Also add a rudimentary publication workflow, as I'm migrating away from Drone - see [here](https://blog.scubbo.org/posts/gitea-actions/).
This commit is contained in:
parent
16c4d20b63
commit
c53e2aafc5
50
.gitea/workflows/publish.yaml
Normal file
50
.gitea/workflows/publish.yaml
Normal file
@ -0,0 +1,50 @@
|
||||
name: Publish
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Import Secrets
|
||||
id: import-secrets
|
||||
uses: hashicorp/vault-action@v2
|
||||
with:
|
||||
url: http://vault.avril
|
||||
method: kubernetes
|
||||
# TODO - when https://github.com/go-gitea/gitea/pull/33945 is merged, instead use per-workflow OIDC-based auth
|
||||
role: act-runner-helm-charts
|
||||
secrets: |
|
||||
shared-secrets/gitea/pat_to_push_images token | GITEA_TOKEN
|
||||
|
||||
- name: Login to Gitea
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: scubbo
|
||||
password: ${{ env.GITEA_TOKEN }}
|
||||
|
||||
- name: Setup QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
- name: Setup Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Build and push image
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
context: .
|
||||
file: Dockerfile
|
||||
target: prod
|
||||
push: true
|
||||
platforms: linux/amd64,linux/arm64
|
||||
tags: |
|
||||
scubbo/edh-elo:${{ gitea.sha }}
|
||||
scubbo/edh-elo:latest
|
||||
|
||||
- name: Output
|
||||
run: |
|
||||
echo "Image pushed: scubbo/edh-elo:${{ gitea.sha }}"
|
||||
|
||||
# TODO - update Helm chart with new image
|
@ -54,7 +54,7 @@ def create_game(game: schemas.GameCreate, db: Session = Depends(get_db)):
|
||||
if game.other_winning_deck_ids:
|
||||
winning_deck_ids.extend(
|
||||
[
|
||||
deck_ids.index(other_winning_id)
|
||||
deck_ids.index(int(other_winning_id))
|
||||
for other_winning_id in game.other_winning_deck_ids.split(",")
|
||||
]
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user