diff --git a/.github/README.md b/.github/README.md index 939a2010a..29ebb6ec6 100644 --- a/.github/README.md +++ b/.github/README.md @@ -4,6 +4,7 @@ [![core-build](https://github.com/azerothcore/azerothcore-wotlk/workflows/core-build/badge.svg?branch=master&event=push)](https://github.com/azerothcore/azerothcore-wotlk/actions?query=workflow%3Acore-build+branch%3Amaster+event%3Apush) [![windows-build](https://github.com/azerothcore/azerothcore-wotlk/workflows/windows-build/badge.svg?branch=master&event=push)](https://github.com/azerothcore/azerothcore-wotlk/actions?query=workflow%3Awindows-build+branch%3Amaster+event%3Apush) [![macos-build](https://github.com/azerothcore/azerothcore-wotlk/workflows/macos-build/badge.svg?branch=master&event=push)](https://github.com/azerothcore/azerothcore-wotlk/actions?query=workflow%3Amacos-build+branch%3Amaster+event%3Apush) +[![docker-build](https://github.com/azerothcore/azerothcore-wotlk/workflows/docker-build/badge.svg?branch=master&event=push)](https://github.com/azerothcore/azerothcore-wotlk/actions?query=workflow%3Adocker-build+branch%3Amaster+event%3Apush) [![Bountysource](https://www.bountysource.com/badge/tracker?tracker_id=40032087)](https://www.bountysource.com/teams/azerothcore/bounties "Put money on issues or get paid for fixing them") [![StackOverflow](http://img.shields.io/badge/stackoverflow-azerothcore-blue.svg)](https://stackoverflow.com/questions/tagged/azerothcore?sort=newest "Ask / browse questions here") [![Discord](https://img.shields.io/discord/217589275766685707.svg)](https://discord.gg/gkt4y2x "Our community hub on Discord") diff --git a/.github/workflows/core_build.yml b/.github/workflows/core_build.yml index 9a67d4dff..2a5045491 100644 --- a/.github/workflows/core_build.yml +++ b/.github/workflows/core_build.yml @@ -81,41 +81,3 @@ jobs: run: source ./apps/ci/ci-error-check.sh - name: Run unit tests run: source ./apps/ci/ci-run-unit-tests.sh - - 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 - 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 - diff --git a/.github/workflows/docker_build.yml b/.github/workflows/docker_build.yml new file mode 100644 index 000000000..602e219f8 --- /dev/null +++ b/.github/workflows/docker_build.yml @@ -0,0 +1,54 @@ +name: docker-build +on: + push: + branches: + - '**' # matches every branch + - '!coverity_scan' # excludes coverity_scan + 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