diff --git a/.github/workflows/build-docker-image.yml b/.github/workflows/build-docker-image.yml index d9f54c8f6..79f937aab 100644 --- a/.github/workflows/build-docker-image.yml +++ b/.github/workflows/build-docker-image.yml @@ -62,19 +62,18 @@ jobs: echo "VERSION=$(date +%Y%m%d-%H%M%S)" >> $GITHUB_OUTPUT fi - - name: Build Docker image - run: | - docker build -t next-terminal:${{ steps.version.outputs.VERSION }} . - echo "Docker image built successfully: next-terminal:${{ steps.version.outputs.VERSION }}" - - - name: Save Docker image - run: | - docker save next-terminal:${{ steps.version.outputs.VERSION}} | gzip > next-terminal-${{ steps.version.outputs.VERSION}}.tar.gz - ls -lh next-terminal-*.tar.gz - - - name: Upload artifact - uses: actions/upload-artifact@v3.2.2 + - name: Login to Gitea Registry + uses: docker/login-action@v3 with: - name: next-terminal-docker-${{ steps.version.outputs.VERSION }} - path: next-terminal-${{ steps.version.outputs.VERSION}}.tar.gz - retention-days: 7 + registry: git.viaeon.com + username: ${{ github.actor }} + password: ${{ secrets.GITEA_TOKEN }} + + - name: Build and push Docker image + uses: docker/build-push-action@v5 + with: + context: . + push: true + tags: | + git.viaeon.com/${{ github.repository }}:${{ steps.version.outputs.VERSION }} + git.viaeon.com/${{ github.repository }}:latest