BW3-Core/.github/workflows/build_image.yml
Jan Speller 2d2374df5b typo
2022-05-23 22:15:25 +02:00

27 lines
1,012 B
YAML

name: Build Docker Image
on:
push:
branches:
- master
- feature/docker
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build the Docker image for the Client
run: docker build . --file Dockerfile --target client --tag docker.pkg.github.com/janspeller/bw3-core/client:latest
- name: Build the Docker image for the Server
run: docker build . --file Dockerfile --target server --tag docker.pkg.github.com/janspeller/bw3-core/server:latest
- name: docker login
env:
GH_USERNAME: ${{ secrets.GH_USERNAME }}
GH_PAT: ${{ secrets.GH_PAT }}
run: echo $CR_PAT | docker login ghcr.io -u USERNAME --password-stdin
- name: Push the Client Docker image to Github package repository
run: docker push docker.pkg.github.com/BOSWatch/bw3-core/client:latest
- name: Push the Server Docker image to Github package repository
run: docker push docker.pkg.github.com/BOSWatch/bw3-core/server:latest