Add timestamp to be visible in fault type #1
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: Build and push Docker image | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'backend/**' | |
| pull_request: | |
| branches: | |
| - main | |
| paths: | |
| - 'backend/**' | |
| workflow_dispatch: | |
| jobs: | |
| build-and-push: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Java | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '21' | |
| distribution: 'temurin' | |
| - name: Build with Maven | |
| run: mvn -DskipTests package | |
| working-directory: backend | |
| - name: Build Docker image | |
| run: docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/transformer-tracker:latest . | |
| working-directory: backend | |
| - name: Login to DockerHub | |
| uses: docker/login-action@v2 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Push image | |
| run: docker push ${{ secrets.DOCKERHUB_USERNAME }}/transformer-tracker:latest |