-
Notifications
You must be signed in to change notification settings - Fork 17
57 lines (49 loc) · 1.47 KB
/
master.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Rokku master branch build
on:
push:
branches:
- master
env:
DOCKER_REPO: wbaa/rokku
jobs:
m-tests:
uses: ./.github/workflows/tests.yml
m-it-tests:
uses: ./.github/workflows/it-tests.yml
tag:
runs-on: ubuntu-latest
needs: [m-tests, m-it-tests]
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
publish-image-latest:
runs-on: ubuntu-latest
needs: tag
steps:
- uses: actions/checkout@v2
with:
fetch-depth: '0'
- name: Setup Scala
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: "17"
- 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_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