diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index d95b7fb..b613770 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -6,17 +6,8 @@ on: - "v*" workflow_dispatch: jobs: - docker: + build: runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - platform: - - linux/amd64 - - linux/arm/v6 - - linux/arm/v7 - - linux/arm/v8 - - linux/arm64 permissions: contents: read packages: write @@ -62,52 +53,6 @@ jobs: push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - platforms: ${{ matrix.platform }} + platforms: linux/amd64,linux/arm64,linux/arm/v6,linux/arm/v7,linux/arm/v8 cache-from: type=gha - cache-to: type=gha,mode=max - - - name: Export digest - run: | - mkdir -p /tmp/digests - digest="${{ steps.build.outputs.digest }}" - touch "/tmp/digests/${digest#sha256:}" - - - name: Upload digest - uses: actions/upload-artifact@v3 - with: - name: digests - path: /tmp/digests/* - if-no-files-found: error - retention-days: 1 - - merge: - runs-on: ubuntu-latest - needs: - - build - steps: - - name: Download digests - uses: actions/download-artifact@v3 - with: - name: digests - path: /tmp/digests - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - name: Docker meta - id: meta - uses: docker/metadata-action@v5 - with: - images: ghcr.io/chyroc/icloud-photo-cli - - name: Login to Docker Hub - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - name: Create manifest list and push - working-directory: /tmp/digests - run: | - docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ - $(printf 'ghcr.io/chyroc/icloud-photo-cli@sha256:%s ' *) - - name: Inspect image - run: | - docker buildx imagetools inspect ghcr.io/chyroc/icloud-photo-cli:${{ steps.meta.outputs.version }} \ No newline at end of file + cache-to: type=gha,mode=max \ No newline at end of file diff --git a/README.md b/README.md index 29ee396..d789175 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ docker run \ -e ICLOUD_WITH_LIVE_PHOTO="true" \ -v /path/to/your/cookie:/icloud_cookie \ -v /path/to/your/photos:/icloud_photos \ - ghcr.io/chyroc/icloud-photo-cli:0.21 download + ghcr.io/chyroc/icloud-photo-cli:0.21.0 download ``` ### By Go @@ -76,7 +76,7 @@ docker run \ -e ICLOUD_FILE=/icloud_photos/filepath \ -v /path/to/your/cookie:/icloud_cookie \ -v /path/to/your/photos:/icloud_photos \ - ghcr.io/chyroc/icloud-photo-cli:0.21 upload + ghcr.io/chyroc/icloud-photo-cli:0.21.0 upload ``` ### By Go diff --git a/docker-compose.yaml b/docker-compose.yaml index c2ed8c5..27b94c6 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -2,7 +2,7 @@ version: "3.7" services: app: - image: ghcr.io/chyroc/icloud-photo-cli:0.21 + image: ghcr.io/chyroc/icloud-photo-cli:0.21.0 environment: - ICLOUD_USERNAME=your_icloud_username - ICLOUD_PASSWORD=your_icloud_password