Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
refresh-cw

GitHub Action

Updates dependencies automatically

v1.0.0

Updates dependencies automatically

refresh-cw

Updates dependencies automatically

Updates dependencies in code to latest semantic ver release. (e.g. TOOL_NAME_VERSION=0.9.17 in Dockerfile)

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Updates dependencies automatically

uses: reviewdog/[email protected]

Learn more about this action in reviewdog/action-depup

Choose a version

depup - Action which updates dependencies automatically

Test reviewdog

depup action updates version in a given file automatically.

demo

Supported patterns example:

REVIEWDOG_VERSION=0.1.0
# v prefix is supported as well.
REVIEWDOG_VERSION=v0.1.0
# Dockerfile sample
ENV REVIEWDOG_VERSION=0.1.0
# space is supported as well.
ENV REVIEWDOG_VERSION 0.1.0
ARG REVIEWDOG_VERSION=0.1.0
# yaml sample
yaml:
  REVIEWDOG_VERSION: 0.1.0

demo: #4

Inputs

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

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
          base: master