Skip to content

Commit

Permalink
feat: switch to rhysd/actionlint action linter
Browse files Browse the repository at this point in the history
  • Loading branch information
lotyp committed Apr 14, 2024
1 parent 51eef3b commit 5a8f0e7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 24 deletions.
27 changes: 8 additions & 19 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
NPM_BIN ?= pnpm
NPM_RUNNER ?= $(NPM_BIN)

#
# Self documenting Makefile code
# ------------------------------------------------------------------------------------
ifneq ($(TERM),)
Expand All @@ -24,7 +25,7 @@ else
WHITE := ""
RST := ""
endif
MAKE_LOGFILE = /tmp/gh-actions.log
MAKE_LOGFILE = /tmp/wayofdev-gh-actions.log
MAKE_CMD_COLOR := $(BLUE)

default: all
Expand All @@ -44,32 +45,16 @@ help: ## Show this menu
@echo ' 🏢 ${YELLOW}Org wayofdev (github.com/wayofdev)${RST}'
.PHONY: help

#
# Default action
# Defines default command when `make` is executed without additional parameters
# ------------------------------------------------------------------------------------
all: help
.PHONY: all


#
# System Actions
# ------------------------------------------------------------------------------------
i: ## Install dependencies
$(NPM_RUNNER) i
.PHONY: i

install: i ## Same as `make i`
.PHONY: install

validate: ## Validate all github action files
@echo "Validating github actions..."
action-validator .github/workflows/apply-labels.yml
action-validator .github/workflows/auto-merge-release.yml
action-validator .github/workflows/build-image.yml
action-validator .github/workflows/create-arch-diagram.yml
action-validator .github/workflows/create-release.yml
action-validator .github/workflows/shellcheck.yml
.PHONY: validate

hooks: ## Install git hooks from pre-commit-config
pre-commit install
pre-commit autoupdate
Expand All @@ -79,6 +64,10 @@ lint-yaml: ## Lint all yaml files
yamllint .
.PHONY: lint-yaml

lint-actions: ## Lint all github actions
docker run --rm -v $(shell pwd):/repo --workdir /repo rhysd/actionlint:latest -color
.PHONY: lint-actions

#
# Release
# ------------------------------------------------------------------------------------
Expand Down
6 changes: 1 addition & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
{
"name": "gh-actions",
"version": "2.0.0",
"private": true,
"dependencies": {
"@action-validator/core": "0.6.0",
"@action-validator/cli": "0.6.0"
}
"private": true
}

0 comments on commit 5a8f0e7

Please sign in to comment.