mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 01:08:35 +00:00
54 lines
1.4 KiB
YAML
54 lines
1.4 KiB
YAML
name: docker-build
|
|
on:
|
|
push:
|
|
branches:
|
|
- 'master'
|
|
pull_request:
|
|
|
|
jobs:
|
|
docker-build-n-deploy:
|
|
strategy:
|
|
fail-fast: true
|
|
runs-on: ubuntu-20.04
|
|
if: github.repository == 'azerothcore/azerothcore-wotlk'
|
|
env:
|
|
DOCKER_EXTENDS_BIND: abstract-no-bind
|
|
DOCKER_BUILD_WORLD_TARGET: worldserver
|
|
DOCKER_BUILD_AUTH_TARGET: authserver
|
|
COMPOSE_DOCKER_CLI_BUILD: 1
|
|
DOCKER_BUILDKIT: 1
|
|
BUILDKIT_INLINE_CACHE: 1
|
|
|
|
steps:
|
|
- name: Extract branch name
|
|
shell: bash
|
|
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
|
|
id: extract_branch
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Configure
|
|
run: |
|
|
docker --version
|
|
docker-compose --version
|
|
|
|
- name: Build
|
|
#env:
|
|
# DOCKER_IMAGE_TAG: ${{ steps.extract_branch.outputs.branch }}
|
|
run: |
|
|
docker-compose --profile all build
|
|
|
|
- name: Login to Docker Hub
|
|
if: ${{ steps.extract_branch.outputs.branch == 'master' }}
|
|
uses: docker/login-action@v1
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
- name: Deploy
|
|
#env:
|
|
# DOCKER_IMAGE_TAG: ${{ steps.extract_branch.outputs.branch }}
|
|
if: ${{ steps.extract_branch.outputs.branch == 'master' }}
|
|
run: |
|
|
docker-compose --profile all push
|