Skip to content

Instantly share code, notes, and snippets.

View ybiquitous's full-sized avatar

Masafumi Koba ybiquitous

View GitHub Profile
@ybiquitous
ybiquitous / actionlint-problem-matcher.json
Last active August 2, 2021 09:58
Run actionlint on GitHub Actions
{
"problemMatcher": [
{
"owner": "actionlint",
"severity": "warning",
"pattern": [
{
"regexp": "^([^:]+):(\\d+):(\\d+): (.+) \\[(\\S+)\\]$",
"file": 1,
"line": 2,
@ybiquitous
ybiquitous / bump-git.yml
Last active June 29, 2021 15:31
Create pull request to bump git version via GitHub Actions
name: Bump git
on:
schedule:
- cron: "0 0 * * 1-5"
workflow_dispatch:
env:
target_file: Dockerfile
@ybiquitous
ybiquitous / outdated-dependencies.yml
Last active April 2, 2021 13:05
Update outdated dependencies issue automatically via GitHub Actions
name: Outdated dependencies
on:
schedule:
- cron: "0 3 * * *"
workflow_dispatch:
jobs:
npm:
runs-on: ubuntu-latest
@ybiquitous
ybiquitous / closure-vs-class.js
Created December 22, 2020 02:57
Closure vs Class on JavaScript
// closure
function foo(initial = 0) {
let counter = initial
return {
get counter() { return counter },
increment() { counter += 1 },
}
}
const f1 = foo()
f1.counter //=> 0
@ybiquitous
ybiquitous / goodcheck.yml
Created October 2, 2020 09:26
Check `set-env` and `add-path` commands of GitHub Actions via Goodcheck
rules:
- id: github.actions.disallow-set-env-and-add-path
pattern:
- "set-env"
- "add-path"
glob:
- ".github/workflows/*.yml"
message: |
Disallow `set-env` and `add-path` commands in workflows of GitHub Actions.
@ybiquitous
ybiquitous / bar.yml
Last active July 3, 2020 12:12
Tips for the management for many Querly rules
- id: sample.sub.bar
pattern: bar
message: Disallo `bar` method
@ybiquitous
ybiquitous / .ruby-version
Last active June 25, 2020 01:11
Steep failure for Enumerable#filter_map
2.7.1
@ybiquitous
ybiquitous / stylelint-compact.json
Last active November 7, 2022 17:43
stylelint on GitHub Actions
{
"problemMatcher": [
{
"owner": "stylelint-compact",
"pattern": [
{
"regexp": "^(.+): line (\\d+), col (\\d+), (\\S+) - (.+) (\\(\\S+\\))$",
"file": 1,
"line": 2,
"column": 3,
@ybiquitous
ybiquitous / rubocop.yml
Last active November 2, 2020 02:53
RuboCop on GitHub Actions
# https://help.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-error-message
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#using-a-specific-shell
#
# https://docs.rubocop.org/rubocop/configuration.html#severity
name: RuboCop
on: pull_request
jobs:
@ybiquitous
ybiquitous / steep.yml
Last active August 6, 2021 21:27
Steep on GitHub Actions
# https://help.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-error-message
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#using-a-specific-shell
name: Steep
on: pull_request
jobs:
check:
runs-on: ubuntu-latest