From bbd19131cb8c3a6b49b86686910eea865a34aaf5 Mon Sep 17 00:00:00 2001 From: haya14busa Date: Sun, 19 Jan 2020 07:47:28 +0000 Subject: [PATCH 1/4] Add README --- .github/workflows/depup.yml | 2 +- README.md | 55 +++++++++++++++++++++++++++++++++++++ action.yml | 4 +-- 3 files changed, 58 insertions(+), 3 deletions(-) create mode 100644 README.md diff --git a/.github/workflows/depup.yml b/.github/workflows/depup.yml index 4d3374a..50493ce 100644 --- a/.github/workflows/depup.yml +++ b/.github/workflows/depup.yml @@ -1,7 +1,7 @@ name: depup on: schedule: - - cron: '*/15 * * * *' + - cron: '14 14 * * *' push: # for testing branches: - '**' diff --git a/README.md b/README.md new file mode 100644 index 0000000..45955e7 --- /dev/null +++ b/README.md @@ -0,0 +1,55 @@ +# depup - Action which updates dependencies automatically + +## Inputs + +```yaml +inputs: + github_token: + description: 'GITHUB_TOKEN to get latest version with GitHub Release API' + default: '${{ github.token }}' + file: + description: 'target file' + required: true + version_name: + description: 'target version name. e.g. REVIEWDOG_VERSION' + required: true + repo: + description: 'target GitHub repository. e.g. reviewdog/reviewdog' + required: true +``` + +## Example usage + +### [.github/workflows/depup.yml](.github/workflows/depup.yml) + +```yml +name: depup +on: + schedule: + - cron: '14 14 * * *' + +jobs: + depup: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - uses: haya14busa/action-depup@v1 + id: depup + with: + file: testdata/testfile + 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 +``` diff --git a/action.yml b/action.yml index e1dcdd6..d65ea52 100644 --- a/action.yml +++ b/action.yml @@ -1,5 +1,5 @@ -name: 'Bump version in code to latest semantic ver release' -description: 'Bump version in code to latest semantic ver release. (e.g. REVIEWDOG=0.9.17 in Dockerfile)' +name: 'Updates dependencies automatically' +description: 'Updates dependencies in code to latest semantic ver release. (e.g. REVIEWDOG=0.9.17 in Dockerfile)' author: 'haya14busa' inputs: github_token: From 771ef2c5b8df8419047bde8da2f4b92ff1ae8ffc Mon Sep 17 00:00:00 2001 From: haya14busa Date: Sun, 19 Jan 2020 07:51:48 +0000 Subject: [PATCH 2/4] add badge --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 45955e7..67d3a58 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ # depup - Action which updates dependencies automatically +[![Test](https://github.com/haya14busa/action-depup/workflows/Test/badge.svg)](https://github.com/haya14busa/action-depup/actions?query=workflow%3ATest) +[![reviewdog](https://github.com/haya14busa/action-depup/workflows/reviewdog/badge.svg)](https://github.com/haya14busa/action-depup/actions?query=workflow%3Areviewdog) + ## Inputs ```yaml From 2158d2a4b31d34c9c1bf7abbc1a34d8dfc0b2b33 Mon Sep 17 00:00:00 2001 From: haya14busa Date: Sun, 19 Jan 2020 07:54:04 +0000 Subject: [PATCH 3/4] set base branch for peter-evans/create-pull-request --- .github/workflows/depup.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/depup.yml b/.github/workflows/depup.yml index 50493ce..af12193 100644 --- a/.github/workflows/depup.yml +++ b/.github/workflows/depup.yml @@ -29,5 +29,4 @@ jobs: This PR is auto generated by [depup workflow](https://github.com/${{ github.repository }}/actions?query=workflow%3Adepup). branch: depup/reviewdog - - + base: master From 04bb23088db45f2b41895afd6fbe264a01026312 Mon Sep 17 00:00:00 2001 From: haya14busa Date: Sun, 19 Jan 2020 07:56:27 +0000 Subject: [PATCH 4/4] use base in README as well --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 67d3a58..4e22b5c 100644 --- a/README.md +++ b/README.md @@ -55,4 +55,5 @@ jobs: This PR is auto generated by [depup workflow](https://github.com/${{ github.repository }}/actions?query=workflow%3Adepup). branch: depup/reviewdog + base: master ```