diff --git a/.gitea/workflows/docker-build.yml b/.gitea/workflows/docker-build.yml index 9f62165..6df89aa 100644 --- a/.gitea/workflows/docker-build.yml +++ b/.gitea/workflows/docker-build.yml @@ -1,31 +1,30 @@ -name: Build and Push Docker Image +name: Build and Push Plex MCP Docker Image on: push: branches: - main - tags: - - 'v*' + - master jobs: build: runs-on: docker + container: + image: catthehacker/ubuntu:act-latest steps: - - name: Checkout repository - uses: actions/checkout@v4 + - name: Checkout + uses: actions/checkout@v3 - - name: Extract tag - id: extract - run: | - if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then - echo "tag=latest" >> $GITHUB_OUTPUT - elif [[ "${{ github.ref }}" == refs/tags/* ]]; then - TAG=${GITHUB_REF#refs/tags/} - echo "tag=${TAG}" >> $GITHUB_OUTPUT - fi + - name: Login to Gitea Container Registry + uses: docker/login-action@v2 + with: + registry: gitea.ext.ben.io + username: ${{ gitea.actor }} + password: ${{ secrets.CR_PAT }} - - name: Build and Push Docker Image - run: | - docker build -t git.local.ben.io/b3nw/plex-mcp:${{ steps.extract.outputs.tag }} . - docker login -u ${{ secrets.REGISTRY_USERNAME }} -p ${{ secrets.REGISTRY_PASSWORD }} git.local.ben.io - docker push git.local.ben.io/b3nw/plex-mcp:${{ steps.extract.outputs.tag }} + - name: Build and Push + uses: docker/build-push-action@v4 + with: + context: . + push: true + tags: gitea.ext.ben.io/${{ gitea.repository }}:latest