Skip to content

Commit

Permalink
[wip] refactor: Add cargo workspace and split highscore models into c…
Browse files Browse the repository at this point in the history
…ommon lib

Adds a cargo workspace at repo root and splits highscore models into a common
library "highscore-types".
This way we do not need to define the types multiple places.
Prereq for adding a cleanup cron job.
  • Loading branch information
Christian Fosli committed Jul 7, 2023
1 parent a9529b0 commit 13ced79
Show file tree
Hide file tree
Showing 21 changed files with 590 additions and 1,390 deletions.
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
target
terraform
README.md
docker-compose.yml
3 changes: 1 addition & 2 deletions .github/workflows/highscore_api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ jobs:
tags="$tags -t ghcr.io/christianfosli/snake/highscore-api:latest"
fi
cd highscore-api
docker build $tags .
docker build -f highscore-api/Dockerfile $tags .
env:
DOCKER_BUILDKIT: 1

Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/wasm_app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,12 @@ on:
permissions:
packages: write

defaults:
run:
working-directory: front-end

jobs:
test:
runs-on: ubuntu-22.04
defaults:
run:
working-directory: front-end
steps:
- uses: actions/checkout@v3

Expand Down Expand Up @@ -55,6 +54,7 @@ jobs:
docker build \
--build-arg VERSION=$BUILD_VERSION \
--build-arg HIGHSCORE_API_BASE_URL=$HIGHSCORE_API_BASE_URL \
-f front-end/Dockerfile
-t ghcr.io/christianfosli/snake/wasm-app:$BUILD_VERSION \
-t ghcr.io/christianfosli/snake/wasm-app:latest \
.
Expand Down Expand Up @@ -86,7 +86,7 @@ jobs:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_VICTORIOUS_ISLAND_0A8DCC303 }}
repo_token: ${{ secrets.GITHUB_TOKEN }}
action: upload
app_location: front-end/out
app_location: out
api_location: "" # leave blank or bring-your-own functions
output_location: ""
skip_app_build: true
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
target
Loading

0 comments on commit 13ced79

Please sign in to comment.