Skip to content

Commit

Permalink
Start building docker images.
Browse files Browse the repository at this point in the history
  • Loading branch information
robholland committed Oct 22, 2024
1 parent 8239da1 commit f196fe9
Show file tree
Hide file tree
Showing 6 changed files with 69 additions and 26 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Docker

on:
push:
branches: [ "main" ]

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup Docker buildx
uses: docker/[email protected]

- name: Log into registry ${{ env.REGISTRY }}
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push core worker Docker image
uses: docker/build-push-action@v5
with:
context: game
file: Dockerfile.core
platforms: linux/amd64,linux/arm64
tags: ${{ env.REGISTRY }}/temporalio/snakes-core-worker:latest

- name: Build and push UI Docker image
uses: docker/build-push-action@v5
with:
context: snakes
platforms: linux/amd64,linux/arm64
tags: ${{ env.REGISTRY }}/temporalio/snakes-ui:latest
8 changes: 0 additions & 8 deletions dynamicconfig/docker.yaml

This file was deleted.

12 changes: 12 additions & 0 deletions game/Dockerfile.core
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM node:18 AS engine

RUN npm install -g typescript ts-node

WORKDIR /app

COPY package*.json ./
RUN npm install

COPY . .

CMD ["npm", "run", "game-worker"]
6 changes: 0 additions & 6 deletions package-lock.json

This file was deleted.

12 changes: 0 additions & 12 deletions scrape.yaml

This file was deleted.

12 changes: 12 additions & 0 deletions snakes/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM node:18 AS engine

RUN npm install -g typescript ts-node

WORKDIR /app

COPY package*.json ./
RUN npm install

COPY . .

CMD ["npm", "run", "host"]

0 comments on commit f196fe9

Please sign in to comment.