Skip to content

docker-build-and-push-master-ci #6

docker-build-and-push-master-ci

docker-build-and-push-master-ci #6

name: docker-build-and-push-master-ci
on:
workflow_run:
workflows:
- Unit-test # Wait for the "Unit-test" workflow to complete
types:
- completed # Trigger only when "Unit-test" completes
jobs:
docker-build-gameserver-image:
if: ${{ github.event.workflow_run.conclusion == 'success' && github.ref == 'refs/heads/master' }} # Run only if tests pass and branch is "develop"
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v4
with:
push: true
tags: jammsen/the-forest-dedicated-server:latest