Merge pull request #85 from CleanCode366/feat/84-file-stored-in-minio… #7
Workflow file for this run
This file contains hidden or 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
| name: Release Pipeline | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v4 | |
| - name: Setup JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: 17 | |
| - name: Cache Maven Dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.m2 | |
| key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
| - name: Run Full Validation | |
| run: mvn clean verify | |
| - name: Build Docker Image | |
| run: | | |
| docker build \ | |
| -t nayanmoni458/stoneinscription-backend:${GITHUB_REF_NAME} \ | |
| -t nayanmoni458/stoneinscription-backend:latest \ | |
| -t nayanmoni458/stoneinscription-backend:sha-${GITHUB_SHA::7} . | |
| - name: Login To Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKER_USERNAME }} | |
| password: ${{ secrets.DOCKER_PASSWORD }} | |
| - name: Push Docker Images | |
| run: | | |
| docker push nayanmoni458/stoneinscription-backend:${GITHUB_REF_NAME} | |
| docker push nayanmoni458/stoneinscription-backend:latest | |
| docker push nayanmoni458/stoneinscription-backend:sha-${GITHUB_SHA::7} |