Skip to content

Commit

Permalink
Merge pull request #11 from haya14busa/fix-10
Browse files Browse the repository at this point in the history
Extract only semver part for latest release
  • Loading branch information
haya14busa authored Jan 27, 2020
2 parents 25c15dd + 228eeb3 commit 865a098
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 3 deletions.
26 changes: 25 additions & 1 deletion .github/workflows/depup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- '**'

jobs:
depup:
reviewdog:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -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
14 changes: 14 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 1 addition & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down
4 changes: 4 additions & 0 deletions testdata/testfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 865a098

Please sign in to comment.