From 4bb68aaf1badd0b2cde23898dce33414555cb039 Mon Sep 17 00:00:00 2001 From: Tsuyoshi CHO Date: Tue, 21 Jan 2020 23:31:24 +0900 Subject: [PATCH 1/6] rename release.yml --- .github/workflows/{update_semver.yml => release.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{update_semver.yml => release.yml} (100%) diff --git a/.github/workflows/update_semver.yml b/.github/workflows/release.yml similarity index 100% rename from .github/workflows/update_semver.yml rename to .github/workflows/release.yml From b6e12fc45fd934f78f8c336e41f76ae44fb2e1b5 Mon Sep 17 00:00:00 2001 From: Tsuyoshi CHO Date: Tue, 21 Jan 2020 23:36:27 +0900 Subject: [PATCH 2/6] fix new release --- .github/workflows/release.yml | 43 +++++++++++++++++++++++++++++++---- 1 file changed, 38 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f07e1e5..3aed40b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,15 +1,48 @@ -name: Update Semver +name: release on: push: - branches-ignore: - - '**' + branches: + - master tags: - 'v*.*.*' + jobs: - update-semver: + release: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 + + # Bump version on merging Pull Requests with specific labels. + # (bump:major,bump:minor,bump:patch) + - id: bumpr + if: "!startsWith(github.ref, 'refs/tags/')" + uses: haya14busa/action-bumpr@v1 + + # Update corresponding major and minor tag. + # e.g. Update v1 and v1.2 when releasing v1.2.3 - uses: haya14busa/action-update-semver@v1 + if: "!steps.bumpr.outputs.skip" with: github_token: ${{ secrets.github_token }} + tag: ${{ steps.bumpr.outputs.next_version }} + + # Get tag name. + - id: tag + uses: haya14busa/action-cond@v1 + with: + cond: "${{ startsWith(github.ref, 'refs/tags/') }}" + if_true: ${{ github.ref }} + if_false: ${{ steps.bumpr.outputs.next_version }} + + # Create release. + - uses: actions/create-release@v1 + if: "steps.tag.outputs.value != ''" + env: + # This token is provided by Actions, you do not need to create your own token + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ steps.tag.outputs.value }} + release_name: Release ${{ steps.tag.outputs.value }} + body: ${{ steps.bumpr.outputs.message }} + draft: false + prerelease: false From 904dc7c8168adb280b9311f55610ddb50226f259 Mon Sep 17 00:00:00 2001 From: Tsuyoshi CHO Date: Tue, 21 Jan 2020 23:38:18 +0900 Subject: [PATCH 3/6] Update README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0f298a1..14a8724 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # GitHub Action: Run redpen with reviewdog [![Docker Image CI](https://github.com/tsuyoshicho/action-redpen/workflows/Docker%20Image%20CI/badge.svg)](https://github.com/tsuyoshicho/action-redpen/actions) -[![Release](https://img.shields.io/github/release/tsuyoshicho/action-redpen.svg?maxAge=43200)](https://github.com/tsuyoshicho/action-redpen/releases) +[![Release](https://github.com/tsuyoshicho/action-redpen/workflows/release/badge.svg)](https://github.com/tsuyoshicho/action-redpen/releases) This action runs [redpen](https://github.com/redpen/redpen) with [reviewdog](https://github.com/reviewdog/reviewdog) on pull requests to improve From a2080ab798607e2acae7661ece227b838d90ba39 Mon Sep 17 00:00:00 2001 From: Tsuyoshi CHO Date: Tue, 21 Jan 2020 23:41:55 +0900 Subject: [PATCH 4/6] Dockerfile fix --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1dd3774..12364a1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,11 @@ FROM openjdk:12-alpine -ENV REDPEN_VERSION 1.10.4 - +ENV REDPEN_VERSION=1.10.4 +ENV REVIEWDOG_VERSION=v0.9.16 RUN apk --update add git curl jq wget && \ rm -rf /var/lib/apt/lists/* && \ rm /var/cache/apk/* -RUN wget -O - -q https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh| sh -s -- -b /usr/local/bin/ v0.9.16 +RUN wget -O - -q https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh| sh -s -- -b /usr/local/bin/ ${REVIEWDOG_VERSION} RUN curl -sL https://api.github.com/repos/redpen-cc/redpen/releases/tags/redpen-${REDPEN_VERSION} -o - \ | jq -r .assets[].browser_download_url \ | grep -i "tar.gz" \ From a60f57c5b157a62919fcab86327d9928f1fb79c2 Mon Sep 17 00:00:00 2001 From: Tsuyoshi CHO Date: Tue, 21 Jan 2020 23:42:23 +0900 Subject: [PATCH 5/6] add depup --- .github/workflows/depup.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/depup.yml diff --git a/.github/workflows/depup.yml b/.github/workflows/depup.yml new file mode 100644 index 0000000..53346d9 --- /dev/null +++ b/.github/workflows/depup.yml @@ -0,0 +1,31 @@ +name: depup +on: + schedule: + - cron: '35 9 * * *' + +jobs: + depup: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - uses: haya14busa/action-depup@v1 + id: depup + with: + file: Dockerfile + version_name: REVIEWDOG_VERSION + repo: reviewdog/reviewdog + + - name: Create Pull Request + uses: peter-evans/create-pull-request@v2 + with: + token: ${{ secrets.GITHUB_TOKEN }} + title: "chore(deps): update reviewdog to ${{ steps.depup.outputs.latest }}" + commit-message: "chore(deps): update reviewdog to ${{ steps.depup.outputs.latest }}" + body: | + Update reviewdog to [${{ steps.depup.outputs.latest }}](https://github.com/reviewdog/reviewdog/releases/tag/v${{ steps.depup.outputs.latest }}) + + This PR is auto generated by [depup workflow](https://github.com/${{ github.repository }}/actions?query=workflow%3Adepup). + branch: depup/reviewdog + base: master + labels: 'bump:patch' From 920b86ec3d598484e7f5ba9d0fedcd353bd3f1b4 Mon Sep 17 00:00:00 2001 From: Tsuyoshi CHO Date: Tue, 21 Jan 2020 23:47:45 +0900 Subject: [PATCH 6/6] update reviewdog and redpen support --- .github/workflows/depup.yml | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/.github/workflows/depup.yml b/.github/workflows/depup.yml index 53346d9..d2a46ca 100644 --- a/.github/workflows/depup.yml +++ b/.github/workflows/depup.yml @@ -4,7 +4,7 @@ on: - cron: '35 9 * * *' jobs: - depup: + depup-reviewdog: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -29,3 +29,28 @@ jobs: branch: depup/reviewdog base: master labels: 'bump:patch' + depup-redpen: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - uses: haya14busa/action-depup@v1 + id: depup + with: + file: Dockerfile + version_name: REDPEN_VERSION + repo: redpen-cc/redpen + + - name: Create Pull Request + uses: peter-evans/create-pull-request@v2 + with: + token: ${{ secrets.GITHUB_TOKEN }} + title: "chore(deps): update redpen to ${{ steps.depup.outputs.latest }}" + commit-message: "chore(deps): update redpen to ${{ steps.depup.outputs.latest }}" + body: | + Update redpen to [${{ steps.depup.outputs.latest }}](https://github.com/redpen-cc/redpen/releases/tag/redpen-${{ steps.depup.outputs.latest }}) + + This PR is auto generated by [depup workflow](https://github.com/${{ github.repository }}/actions?query=workflow%3Adepup). + branch: depup/redpen + base: master + labels: 'bump:patch'