Skip to content

CI 6

CI 6 #19

Workflow file for this run

name: build
on:
push:
branches: [ dev ]
pull_request:
branches: [ dev ]
jobs:
build-main:
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'
cache: 'maven'
- name: Setup Testcontainers Cloud Client
uses: atomicjar/testcontainers-cloud-setup-action@v1
with:
token: ${{ secrets.TC_CLOUD_TOKEN }}
- name: Build and test 2Bass
run: mvn package
- name: Get pom version
id: pom-version
run: echo ::set-output name=version::$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)
- name: Build docker image
if: success() && github.ref == 'refs/heads/dev'
run: ./_build-docker.sh
- name: Log in to Docker Hub
if: success() && github.ref == 'refs/heads/dev'
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Push
if: success() && github.ref == 'refs/heads/dev'
run: |
docker push curs/2bass:latest
docker image tag curs/2bass curs/${{ steps.pom-version.outputs.version }}
docker push curs/2bass:${{ steps.pom-version.outputs.version }}