Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bot build: add workflow to publish docker container of headless-game-runner (bot) #12756

Merged
merged 2 commits into from
Jul 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/build-headless-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Runs when master branch is updated.
# Creates & pushes a docker container for bots.

name: Master Branch Build - Build Bot Docker Container
on:
push:
branches:
- master
jobs:
build:
env:
IS_MASTER_BUILD: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 11
- name: Login to GitHub Container Registry
if: ${{ env.IS_MASTER_BUILD }}
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: build headless docker container
if: ${{ env.IS_MASTER_BUILD }}
run: |
./gradlew :game-app:game-headless:shadowJar
docker build game-app/game-headless --tag ghcr.io/triplea-game/bot:latest
docker push ghcr.io/triplea-game/bot:latest