mirror of
https://github.com/BOSWatch/BW3-Core.git
synced 2026-01-14 04:30:06 +01:00
27 lines
1,012 B
YAML
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
|