diff --git a/.github/workflows/depup.yml b/.github/workflows/depup.yml index af12193..d2f10a3 100644 --- a/.github/workflows/depup.yml +++ b/.github/workflows/depup.yml @@ -7,7 +7,7 @@ on: - '**' jobs: - depup: + reviewdog: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -30,3 +30,27 @@ jobs: This PR is auto generated by [depup workflow](https://github.com/${{ github.repository }}/actions?query=workflow%3Adepup). branch: depup/reviewdog base: master + + redpen: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: ./ + id: depup + with: + file: testdata/testfile + 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 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d3d514a..9d5a1f0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,3 +18,17 @@ jobs: - name: Check diff run: git diff + + needless_prefix: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: ./ + id: depup + with: + file: testdata/testfile + version_name: REDPEN_VERSION + repo: redpen-cc/redpen + + - name: Check diff + run: git diff diff --git a/entrypoint.sh b/entrypoint.sh index d8b7314..7d3502f 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -30,8 +30,7 @@ list_releases() { LATEST_VERSION=$(\ list_releases | \ jq -r '.[] | .tag_name' | \ - sed 's/^v//' | \ - grep -P '\d+\.\d+\.\d+' | \ + grep -oP '\d+\.\d+\.\d+$' | \ sort --version-sort --reverse | \ head -n1 ) diff --git a/testdata/testfile b/testdata/testfile index 41bc285..33f8ca0 100644 --- a/testdata/testfile +++ b/testdata/testfile @@ -10,3 +10,7 @@ yaml: The above version should be updated to the latest version with this action. + +Other test cases. + +REDPEN_VERSION=1.10.1