diff --git a/.github/workflows/free.yml b/.github/workflows/free.yml new file mode 100644 index 0000000..2907e25 --- /dev/null +++ b/.github/workflows/free.yml @@ -0,0 +1,59 @@ +name: Build zurg-1000 image + +on: + push: + branches: main + +env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }}-1000 + +jobs: + build-and-push-image: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - name: Check out the repo + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Cache Docker layers + uses: actions/cache@v3 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-buildx- + + - name: Log in to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + + - name: zurg-1000 + run: | + find . -type f -name "*.go" -exec sed -i 's/GetTorrents(t.token, 0)/GetTorrents(t.token, 1000)/g' {} + + + - name: Build and push Docker image + uses: docker/build-push-action@v5 + with: + context: . + platforms: linux/amd64,linux/arm64 + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache diff --git a/.github/workflows/image.yml b/.github/workflows/pro.yml similarity index 95% rename from .github/workflows/image.yml rename to .github/workflows/pro.yml index 818e773..47627b6 100644 --- a/.github/workflows/image.yml +++ b/.github/workflows/pro.yml @@ -1,4 +1,4 @@ -name: Publish Multi-platform Docker Image to Github Container Registry +name: Build zurg image on: push: