diff --git a/.github/workflows/publish_docs.yml b/.github/workflows/publish_docs.yml new file mode 100644 index 0000000..7fd2b80 --- /dev/null +++ b/.github/workflows/publish_docs.yml @@ -0,0 +1,28 @@ +name: Publish HPR documents + +on: + push: + tags: + - 'v*' + +jobs: + build: + name: Create Release + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@master + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token + with: + tag_name: ${{ github.ref }} + release_name: v${{ github.ref }} + body: | + Changes in this Release + - First Change + - Second Change + draft: false + prerelease: false diff --git a/.github/workflows/publish_nightly.yml b/.github/workflows/publish_nightly.yml new file mode 100644 index 0000000..e237df6 --- /dev/null +++ b/.github/workflows/publish_nightly.yml @@ -0,0 +1,33 @@ +name: Publish nightly Version + +on: + push: + branches: + - master + +jobs: + build: + name: Publish Docker Image + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: Get build date + id: date + run: echo "::set-output name=date::$(date +'%Y-%m-%d %H:%M:%S %z')" + - name: Publish to Registry + uses: elgohr/Publish-Docker-Github-Action@master + env: + VCS_REF: ${{ github.sha }} + VERSION: nightly + BUILD_DATE: ${{ steps.date.outputs.date }} + with: + name: icyleafcn/zealot:nightly + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + buildargs: BUILD_DATE,VCS_REF,VERSION + - name: Docker Hub Description + uses: peter-evans/dockerhub-description@v2.1.0 + env: + DOCKERHUB_USERNAME: ${{ secrets.DOCKER_USERNAME }} + DOCKERHUB_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} + DOCKERHUB_REPOSITORY: icyleafcn/hpr diff --git a/.github/workflows/publish_release.yml b/.github/workflows/publish_release.yml index d05c929..0d4d273 100644 --- a/.github/workflows/publish_release.yml +++ b/.github/workflows/publish_release.yml @@ -6,27 +6,6 @@ on: - 'v*' jobs: - build: - name: Create Release - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@master - - name: Create Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token - with: - tag_name: ${{ github.ref }} - release_name: v${{ github.ref }} - body: | - Changes in this Release - - First Change - - Second Change - draft: false - prerelease: false - build: name: Publish Docker Image runs-on: ubuntu-latest @@ -37,9 +16,7 @@ jobs: run: echo "::set-output name=date::$(date +'%Y-%m-%d %H:%M:%S %z')" - name: Get version id: version - run: echo "::set-output name=version::$(echo ${{ github.ref }} | sed 's/v//')" - - name: Echo the version - run: echo ${{ steps.date.outputs.version }} + run: echo "::set-output name=version::$(echo ${{ github.ref }} | sed 's/refs\/tags\///' | sed 's/v//')" - name: Publish to Registry uses: elgohr/Publish-Docker-Github-Action@master env: @@ -57,7 +34,3 @@ jobs: DOCKERHUB_USERNAME: ${{ secrets.DOCKER_USERNAME }} DOCKERHUB_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} DOCKERHUB_REPOSITORY: icyleafcn/hpr - - name: Trigger Microbadger update - uses: wei/curl@master - with: - args: -X POST ${{ secrets.MICROBADGER_WEBHOOK_URL }} diff --git a/Gemfile.lock b/Gemfile.lock index 6ced46b..c17cda5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -179,4 +179,4 @@ DEPENDENCIES sqlite3 (~> 1.4.2) BUNDLED WITH - 1.17.2 + 2.1.4 diff --git a/docs/_coverpage.md b/docs/_coverpage.md index 1b85064..2d6c991 100644 --- a/docs/_coverpage.md +++ b/docs/_coverpage.md @@ -1,6 +1,6 @@ ![logo](_media/icon.png) -# ḫpr 0.13.1 +# ḫpr 0.14.0 > 镜像任意 Git 仓库到 Gitlab 的同步工具,具有定时更新的功能。 diff --git a/lib/hpr/version.rb b/lib/hpr/version.rb index 08369d3..109741a 100644 --- a/lib/hpr/version.rb +++ b/lib/hpr/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Hpr - VERSION = '0.13.1' + VERSION = '0.14.0' end