-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
7 additions
and
57 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,31 +7,8 @@ name: Build Docker Image and Deploy to DEV | |
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/[email protected] | ||
with: | ||
distribution: 'temurin' | ||
java-version: '17' | ||
- 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 | ||
run: docker tag remotemobprogramming/mob-timer remotemobprogramming/mob-timer:${{ github.sha }} | ||
- name: Docker Push Latest | ||
run: docker push remotemobprogramming/mob-timer:latest | ||
- name: Docker Push Tag | ||
run: docker push remotemobprogramming/mob-timer:${{ github.sha }} | ||
deployment: | ||
needs: dockerbuild | ||
needs: test | ||
environment: development | ||
concurrency: development | ||
runs-on: ubuntu-latest | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,42 +5,15 @@ 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/[email protected] | ||
with: | ||
distribution: 'temurin' | ||
java-version: '17' | ||
- 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 | ||
run: docker tag remotemobprogramming/mob-timer remotemobprogramming/mob-timer:${{ github.sha }} | ||
- name: Docker Push Latest | ||
run: docker push remotemobprogramming/mob-timer:latest | ||
- name: Docker Push Tag | ||
run: docker push remotemobprogramming/mob-timer:${{ github.sha }} | ||
deployment: | ||
needs: dockerbuild | ||
needs: test | ||
environment: production | ||
concurrency: production | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: deploy | ||
uses: appleboy/[email protected] | ||
- uses: actions/checkout@v3 | ||
- uses: akhileshns/[email protected] | ||
with: | ||
host: ${{ secrets.SSH_HOST_PROD }} | ||
username: ${{ secrets.SSH_USERNAME }} | ||
key: ${{ secrets.SSH_KEY }} | ||
script: | | ||
docker stop mobtimer | ||
docker rm mobtimer | ||
docker run -d -e VIRTUAL_HOST=timer.mob.sh -e LETSENCRYPT_HOST=timer.mob.sh -e [email protected] -e PORT=80 --expose 80 --network=proxy --pull always --name mobtimer remotemobprogramming/mob-timer:${{ github.sha }} | ||
heroku_api_key: ${{secrets.HEROKU_AUTH_TOKEN}} | ||
heroku_app_name: ${{ secrets.HEROKU_APP_NAME_PROD }} | ||
heroku_email: ${{ secrets.HEROKU_EMAIL }} |