name: Build ROCm Image on: push: branches: - main - dev jobs: build: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - name: Setup Docker Buildx uses: docker/setup-buildx-action@v3 - name: Login to Gitea Registry uses: docker/login-action@v3 with: registry: git.sdgarren.com username: ${{ secrets.REGISTRY_USERNAME }} password: ${{ secrets.REGISTRY_TOKEN }} - name: Set tags id: tags run: | if [ "${{ gitea.ref_name }}" = "main" ]; then echo "tags=git.sdgarren.com/scott/rocm-chatterbox-whisper:latest,git.sdgarren.com/scott/rocm-chatterbox-whisper:${{ gitea.sha }}" >> $GITHUB_OUTPUT else echo "tags=git.sdgarren.com/scott/rocm-chatterbox-whisper:${{ gitea.ref_name }},git.sdgarren.com/scott/rocm-chatterbox-whisper:${{ gitea.sha }}" >> $GITHUB_OUTPUT fi - name: Build and Push uses: docker/build-push-action@v6 with: context: . file: Dockerfile.rocm push: true tags: ${{ steps.tags.outputs.tags }} cache-from: type=registry,ref=git.sdgarren.com/scott/rocm-chatterbox-whisper:latest cache-to: type=inline