-
Notifications
You must be signed in to change notification settings - Fork 5
46 lines (46 loc) · 1.58 KB
/
release.yml
File metadata and controls
46 lines (46 loc) · 1.58 KB
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
on:
release:
types: [published]
name: Release
jobs:
test:
uses: remotemobprogramming/timer/.github/workflows/test.yml@main
dockerbuild:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Java JDK
uses: actions/setup-java@v4.2.1
with:
distribution: 'zulu'
java-version: '21'
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Docker Build
run: ./mvnw spring-boot:build-image
- name: Docker Tag Version
run: docker tag remotemobprogramming/mob-timer remotemobprogramming/mob-timer:${{ github.sha }}
- name: Docker Tag Hash
run: docker tag remotemobprogramming/mob-timer remotemobprogramming/mob-timer:${{ github.ref_name }}
- name: Docker Push Latest
run: docker push remotemobprogramming/mob-timer:latest
- name: Docker Push Version
run: docker push remotemobprogramming/mob-timer:${{ github.ref_name }}
- name: Docker Push Hash
run: docker push remotemobprogramming/mob-timer:${{ github.sha }}
deployment:
needs: test
environment: production
concurrency: production
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: akhileshns/heroku-deploy@v3.12.13
with:
heroku_api_key: ${{secrets.HEROKU_AUTH_TOKEN}}
heroku_app_name: ${{ secrets.HEROKU_APP_NAME_PROD }}
heroku_email: ${{ secrets.HEROKU_EMAIL }}