Skip to content

Build docker images using github actions #5

Build docker images using github actions

Build docker images using github actions #5

Workflow file for this run

name: Botfest
on:
workflow_dispatch:
push:
paths:
- "botfest/**"
- "common/**"
- "gradle/**"
- "gradle.properties"
- "settings.gradle.kts"
- "gradlew"
pull_request:
paths:
- "botfest/**"
- "common/**"
- "gradle/**"
- "gradle.properties"
- "settings.gradle.kts"
- "gradlew"
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup java and gradle
uses: ./.github/./actions/java.yml
- name: Run check
run: ./gradlew botfest:check
- name: Run test
run: ./gradlew botfest:test
publish:
runs-on: ubuntu-latest
needs: test
if: github.ref == 'refs/heads/prod'
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup java and gradle
uses: ./.github/./actions/java.yml
- name: Build project and generate docker file
run: ./gradlew botfest:createDockerfile
- name: Build and push docker image
uses: docker/build-push-action@v6
with:
context: "botfest/build"
push: true
tags: modfest/botfest:latest