diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 10f03c1..f070695 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -1,14 +1,25 @@ on: [push] + jobs: build-push: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + - name: Login Harbor run: echo "${{ secrets.HARBOR_PASSWORD }}" | docker login 172.35.0.216 -u ${{ secrets.HARBOR_USERNAME }} --password-stdin - - name: Build/Push + + - name: Build/Push with Tagging run: | - docker build -t 172.35.0.216/library/vendaweb-portal:latest . - docker push 172.35.0.216/library/vendaweb-portal:latest + REPO="172.35.0.216/library/vendaweb-portal" + VERSION="v${{ gitea.run_number }}" + + echo "Iniciando build da versão: $VERSION" + + docker build -t $REPO:$VERSION -t $REPO:latest . + + docker push $REPO:$VERSION + docker push $REPO:latest + - name: Webhook Portainer run: curl -X POST "${{ secrets.PORTAINER_WEBHOOK_FRONT }}" \ No newline at end of file