Skip to content

Commit

Permalink
chore: upgrade ci steps
Browse files Browse the repository at this point in the history
  • Loading branch information
FerroEduardo committed Jul 21, 2024
1 parent eb6b0ea commit 94b13ec
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: 'Check out repository'
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: 'Set up JDK'
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
Expand Down
15 changes: 10 additions & 5 deletions .github/workflows/deploy-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: 'Check out repository'
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Log in to Docker Hub
uses: docker/login-action@v3.0.0
uses: docker/login-action@v3.2.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push Docker image
uses: docker/build-push-action@v5.0.0
uses: docker/build-push-action@v6.4.1
with:
context: .
file: ./Dockerfile
Expand All @@ -32,6 +32,11 @@ jobs:
push: ${{ github.event_name != 'pull_request' }}
tags: eduardoferro/capivara:${{ github.sha }},${{ github.event_name == 'release' && format('eduardoferro/capivara:latest,eduardoferro/capivara:{0}', github.ref_name) || '' }}

- name: 'debug'
run: echo $(nc -w10 -z -v $INSTANCE_IP 22)
env:
INSTANCE_IP: ${{ secrets.INSTANCE_IP }}

- name: 'Wait for SSH'
run: |
SLEEP=1
Expand All @@ -50,7 +55,7 @@ jobs:
INSTANCE_IP: ${{ secrets.INSTANCE_IP }}

- name: 'Push start-container.sh'
uses: appleboy/[email protected].4
uses: appleboy/[email protected].7
with:
host: ${{ secrets.INSTANCE_IP }}
username: ${{ secrets.SSH_USERNAME }}
Expand All @@ -61,7 +66,7 @@ jobs:
strip_components: 1

- name: 'Start BOT'
uses: appleboy/[email protected].4
uses: appleboy/[email protected].7
with:
host: ${{ secrets.INSTANCE_IP }}
username: ${{ secrets.SSH_USERNAME }}
Expand Down

0 comments on commit 94b13ec

Please sign in to comment.