-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
e6e3548
commit 5914c02
Showing
1 changed file
with
12 additions
and
10 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 |
---|---|---|
|
@@ -24,27 +24,29 @@ jobs: | |
restore-keys: | | ||
${{ runner.os }}-maven- | ||
- name: Build Application JAR | ||
run: mvn clean package | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/[email protected] | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
|
||
- name: Build Application JAR | ||
working-directory: . | ||
run: mvn clean package | ||
|
||
- name: List files | ||
run: ls -R | ||
working-directory: . | ||
run: ls -R | ||
|
||
- name: Build Docker Image | ||
run: docker build -t ${{ secrets.DOCKER_USERNAME }}/blog-api-server . | ||
- name: Docker Compose Build | ||
working-directory: . | ||
run: docker compose build | ||
|
||
- name: Tag and Push Docker Image | ||
|
||
- name: Push to Docker Hub Container Registry | ||
run: | | ||
docker tag ${{ secrets.DOCKER_USERNAME }}/blog-api-server:latest ${{ secrets.DOCKER_USERNAME }}/blog-api-server:${{ github.run_id }} | ||
docker push ${{ secrets.DOCKER_USERNAME }}/blog-api-server:${{ github.run_id }} | ||
docker push ${{ secrets.DOCKER_USERNAME }}/blog-api-server:latest | ||
- name: Run Docker Compose | ||
run: docker-compose -f docker-compose.yml up -d | ||