Skip to content

Merge pull request #71 from ing-bank/npa-token #10

Merge pull request #71 from ing-bank/npa-token

Merge pull request #71 from ing-bank/npa-token #10

Workflow file for this run

name: Rokku-STS master branch build
on:
push:
branches:
- master
env:
DOCKER_REPO: wbaa/rokku-sts
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
cache: 'sbt'
- name: Run docker-compose
run: docker-compose up -d && ./scripts/waitForContainerSetup.sh
- name: Run tests
run: sbt clean coverage test it:test coverageReport
tag:
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v2
with:
fetch-depth: '0'
- name: Bump version and push tag
uses: anothrNick/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
WITH_V: true
VERBOSE: true
DEFAULT_BUMP: patch
upload-image:
runs-on: ubuntu-latest
needs: tag
steps:
- uses: actions/checkout@v2
with:
fetch-depth: '0'
- name: Build and publish docker image
run: |
# Login to docker
echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
# Build docker image
ROKKU_STS_VERSION=$(git describe --tags --abbrev=0) sbt clean docker:publish;
echo "Built image $DOCKER_REPO:$(git describe --tags --abbrev=0)";
# Add latest tag
docker tag $DOCKER_REPO:$(git describe --tags --abbrev=0) $DOCKER_REPO:latest;
docker push $DOCKER_REPO:$(git describe --tags --abbrev=0)
docker push $DOCKER_REPO:latest