diff --git a/.github/workflows/Manually_docker_image.yml b/.github/workflows/Manually_docker_image.yml new file mode 100644 index 0000000..94a17d9 --- /dev/null +++ b/.github/workflows/Manually_docker_image.yml @@ -0,0 +1,45 @@ +name: 手动构建并发布 Docker 镜像 + +on: + workflow_dispatch: + +jobs: + publish-docker: + runs-on: ubuntu-latest + + steps: + - name: 拉取源码 + uses: actions/checkout@v4 + with: + fetch-depth: 1 + + - name: 获取最新的发布标签 + id: get-latest-release + run: | + LATEST_TAG=$(curl -s \ + -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ + https://api.github.com/repos/${{ github.repository }}/releases/latest \ + | jq -r '.tag_name') + echo "LATEST_TAG=$LATEST_TAG" >> $GITHUB_ENV + + - name: 设置 QEMU + uses: docker/setup-qemu-action@v3 + + - name: 设置 Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: 登录到 DockerHub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: 构建和推送 Docker 镜像到 Docker Hub + uses: docker/build-push-action@v6 + with: + context: . + platforms: linux/amd64,linux/arm64 + push: true + tags: | + ${{ secrets.DOCKERHUB_USERNAME }}/xhs-downloader:${{ github.event.release.tag_name }} + ${{ secrets.DOCKERHUB_USERNAME }}/xhs-downloader:latest diff --git a/.github/workflows/docker-image.yml b/.github/workflows/Release_docker_image.yml similarity index 81% rename from .github/workflows/docker-image.yml rename to .github/workflows/Release_docker_image.yml index 2706e79..d405a5b 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/Release_docker_image.yml @@ -33,4 +33,6 @@ jobs: context: . platforms: linux/amd64,linux/arm64 push: true - tags: ${{ secrets.DOCKERHUB_USERNAME }}/xhs-downloader:${{ github.event.release.tag_name }} + tags: | + ${{ secrets.DOCKERHUB_USERNAME }}/xhs-downloader:${{ github.event.release.tag_name }} + ${{ secrets.DOCKERHUB_USERNAME }}/xhs-downloader:latest diff --git a/README.md b/README.md index 2055bac..c6c86ae 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@

XHS-Downloader

简体中文 | English

+JoeanAmier%2FXHS-Downloader | Trendshift +
GitHub GitHub forks GitHub Repo stars diff --git a/README_EN.md b/README_EN.md index 8513d6a..9381496 100644 --- a/README_EN.md +++ b/README_EN.md @@ -2,6 +2,8 @@

XHS-Downloader

简体中文 | English

+JoeanAmier%2FXHS-Downloader | Trendshift +
GitHub GitHub forks GitHub Repo stars diff --git a/static/XHS-Downloader.js b/static/XHS-Downloader.js index 968b5c6..6be53ba 100644 --- a/static/XHS-Downloader.js +++ b/static/XHS-Downloader.js @@ -1,7 +1,7 @@ // ==UserScript== // @name XHS-Downloader // @namespace https://github.com/JoeanAmier/XHS-Downloader -// @version 1.8.6 +// @version 1.8.7 // @description 提取小红书作品/用户链接,下载小红书无水印图文/视频作品文件 // @author JoeanAmier // @match http*://xhslink.com/*