v1.3.0 #10
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |