Skip to content

Commit

Permalink
Merge pull request #8 from reviewdog/workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
haya14busa authored May 9, 2020
2 parents 1e1d96d + af63321 commit 0c93a71
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 14 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/depup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: depup
on:
schedule:
- cron: '14 14 * * *' # Runs at 14:14 UTC every day
repository_dispatch:
types: [depup]

jobs:
reviewdog:
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 [v${{ steps.depup.outputs.latest }}](https://github.com/reviewdog/reviewdog/releases/tag/v${{ steps.depup.outputs.latest }})
Compare [v${{ steps.depup.outputs.current }}...v${{ steps.depup.outputs.latest }}](https://github.com/reviewdog/reviewdog/compare/v${{ steps.depup.outputs.current }}...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:minor"
48 changes: 36 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,47 @@
name: Create Release
name: release
on:
push:
branches:
- master
tags:
- 'v*'
- 'v*.*.*'

jobs:
build:
name: Create Release
release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@master
- name: Create Release
id: create_release
uses: actions/create-release@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:
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: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: Release ${{ github.ref }}
tag_name: ${{ steps.tag.outputs.value }}
release_name: Release ${{ steps.tag.outputs.value }}
body: ${{ steps.bumpr.outputs.message }}
draft: false
prerelease: false
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
FROM koalaman/shellcheck-alpine:latest

RUN wget -O - -q https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh| sh -s -- -b /usr/local/bin/ v0.9.15
ENV REVIEWDOG_VERSION=v0.10.0

RUN wget -O - -q https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh| sh -s -- -b /usr/local/bin/ ${REVIEWDOG_VERSION}
RUN apk --update add jq git findutils && \
rm -rf /var/lib/apt/lists/* && \
rm /var/cache/apk/*
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# GitHub Action: Run shellcheck with reviewdog

[![Docker Image CI](https://github.com/reviewdog/action-shellcheck/workflows/Docker%20Image%20CI/badge.svg)](https://github.com/reviewdog/action-shellcheck/actions)
[![Release](https://img.shields.io/github/release/reviewdog/action-shellcheck.svg?maxAge=43200)](https://github.com/reviewdog/action-shellcheck/releases)
[![depup](https://github.com/reviewdog/action-shellcheck/workflows/depup/badge.svg)](https://github.com/reviewdog/action-shellcheck/actions?query=workflow%3Adepup)
[![release](https://github.com/reviewdog/action-shellcheck/workflows/release/badge.svg)](https://github.com/reviewdog/action-shellcheck/actions?query=workflow%3Arelease)
[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/reviewdog/action-shellcheck?logo=github&sort=semver)](https://github.com/reviewdog/action-shellcheck/releases)
[![action-bumpr supported](https://img.shields.io/badge/bumpr-supported-ff69b4?logo=github&link=https://github.com/haya14busa/action-bumpr)](https://github.com/haya14busa/action-bumpr)

This action runs [shellcheck](https://github.com/koalaman/shellcheck) with
[reviewdog](https://github.com/reviewdog/reviewdog) on pull requests to improve
Expand Down

0 comments on commit 0c93a71

Please sign in to comment.