name: Build and Push Docker Image on: push: branches: [ develop ] jobs: build: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 with: submodules: recursive - name: Fetch upstream tag run: | git remote add upstream https://github.com/Lidarr/Lidarr.git git fetch upstream refs/tags/v3.1.0.4875:refs/tags/v3.1.0.4875 git checkout v3.1.0.4875 - name: Apply fix run: | sed -i 's/_rootFolderService.All().Select(x => x.Path).ToList();/artists.Select(x => x.Path).ToList();/' src/NzbDrone.Core/Music/RefreshArtistService.cs - name: Verify fix applied run: grep -n "artists.Select(x => x.Path).ToList()" src/NzbDrone.Core/Music/RefreshArtistService.cs - name: Setup .NET uses: actions/setup-dotnet@v4 with: dotnet-version: '8.0.x' - name: Restore dependencies run: dotnet restore src/Lidarr.sln - name: Build NzbDrone.Core run: dotnet build src/NzbDrone.Core/Lidarr.Core.csproj --configuration Release --no-restore -p:RunAnalyzers=false - name: Copy DLL to root run: cp _output/net8.0/Lidarr.Core.dll ./Lidarr.Core.dll - name: Login to Docker Hub uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build and Push uses: docker/build-push-action@v5 with: context: . file: ./Dockerfile push: true tags: | mcphelps/lidarr-fix:latest