Skip to content

Commit

Permalink
feat: add build all docker images to GitHub workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
smart7even committed Aug 30, 2024
1 parent 49b767d commit 29fd0eb
Showing 1 changed file with 19 additions and 5 deletions.
24 changes: 19 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ on:
workflow_dispatch:

env:
IMAGE_NAME: ghcr.io/${{ github.repository_owner }}/${{ github.repository }}/bot
BOT_IMAGE_NAME: ghcr.io/${{ github.repository_owner }}/${{ github.repository }}/bot
SERVER_IMAGE_NAME: ghcr.io/${{ github.repository_owner }}/${{ github.repository }}/server
INITIALIZER_IMAGE_NAME: ghcr.io/${{ github.repository_owner }}/${{ github.repository }}/initializer

jobs:
build-and-push:
Expand All @@ -24,8 +26,20 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build Docker image
run: docker build -t $IMAGE_NAME . -f Dockerfile-bot
- name: Build Docker image for bot
run: docker build -t $BOT_IMAGE_NAME . -f Dockerfile-bot

- name: Push Docker image to ghcr.io
run: docker push $IMAGE_NAME
- name: Build Docker image for server
run: docker build -t $SERVER_IMAGE_NAME . -f Dockerfile-server

- name: Build Docker image for initializer
run: docker build -t $INITIALIZER_IMAGE_NAME . -f Dockerfile-initializer

- name: Push Docker image for bot to ghcr.io
run: docker push $BOT_IMAGE_NAME

- name: Push Docker image for server to ghcr.io
run: docker push $SERVER_IMAGE_NAME

- name: Push Docker image for initializer to ghcr.io
run: docker push $INITIALIZER_IMAGE_NAME

0 comments on commit 29fd0eb

Please sign in to comment.