| 123456789101112131415161718192021222324252627 |
- name: Release
- on:
- push:
- branches: [ main ]
- jobs:
- build:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v3
- - name: Build jar
- run: chmod +x ./mvnw && ./mvnw clean jar:jar
- - name: Run tests
- run: ./mvnw test
- - name: Build the Docker image
- run: ./mvnw spring-boot:build-image
- - name: Login to Docker Hub
- uses: docker/login-action@v2
- with:
- username: ${{ secrets.DOCKERHUB_USERNAME }}
- password: ${{ secrets.DOCKERHUB_TOKEN }}
- - name: Push image
- run: docker push lhamacorp/stocks-be
|