name: Build and push ha-elegoo-spaghetti-detection image on: workflow_dispatch: inputs: tag: description: 'Release tag' required: true type: string default: 'v1.0.0' jobs: build: runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v4 - name: Docker login run: | echo "${{ secrets.ACCESS_TOKEN }}" | docker login gitea.furb.it \ -u "${{ secrets.USERNAME }}" \ --password-stdin # Build image with tag - name: Build Docker image working-directory: ./addon run: | docker build \ -f Dockerfile.standalone.base \ --label ha-elegoo-spaghetti-detection.tag=${{ inputs.tag }} \ -t gitea.furb.it/Docker/ha-elegoo-spaghetti-detection:latest \ -t gitea.furb.it/Docker/ha-elegoo-spaghetti-detection:${{ inputs.tag }} \ . # Push images - name: Push Docker images run: | docker push gitea.furb.it/Docker/ha-elegoo-spaghetti-detection:latest docker push gitea.furb.it/Docker/ha-elegoo-spaghetti-detection:${{ inputs.tag }} # Create release using gitea-release-action - name: Create release uses: akkuman/gitea-release-action@v1 with: server: "https://gitea.furb.it" token: ${{ secrets.ACCESS_TOKEN }} repository: Docker/ha-elegoo-spaghetti-detection tag_name: ${{ inputs.tag }} name: ${{ inputs.tag }} body: "Docker image: `gitea.furb.it/${{ vars.SERVER_IMAGE }}:${{ inputs.tag }}`"