diff --git a/.github/workflows/hugo.yaml b/.github/workflows/hugo.yaml index 39bb359..bffdc93 100644 --- a/.github/workflows/hugo.yaml +++ b/.github/workflows/hugo.yaml @@ -1,3 +1,4 @@ +--- # Workflow for building and deploying a Hugo site to GitHub Pages from https://gohugo.io/hosting-and-deployment/hosting-on-github/ name: Deploy Hugo site to Pages @@ -37,7 +38,7 @@ jobs: - name: Install Hugo CLI run: | wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \ - && sudo dpkg -i ${{ runner.temp }}/hugo.deb + && sudo dpkg -i ${{ runner.temp }}/hugo.deb # disabled since not used for this site #- name: Install Dart Sass # run: sudo snap install dart-sass @@ -62,7 +63,7 @@ jobs: hugo \ --gc \ --minify \ - --baseURL "${{ steps.pages.outputs.base_url }}/" + --baseURL "${{ steps.pages.outputs.base_url }}/" - name: Upload artifact uses: actions/upload-pages-artifact@v3 with: @@ -79,4 +80,3 @@ jobs: - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v4 - diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9201f4a..909e4d5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,7 +4,7 @@ minimum_pre_commit_version: "1.15" repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 + rev: v4.6.0 hooks: - id: check-yaml name: Check for valid YAML syntax in repo @@ -24,14 +24,14 @@ repos: name: Ensure line-ending is consistent description: https://github.com/pre-commit/pre-commit-hooks/blob/master/pre_commit_hooks/mixed_line_ending.py files: \.(sh|yaml|yml)$ - - id: check-executables-have-shebangs - name: Checks that non-binary executables have a proper shebang - description: https://github.com/pre-commit/pre-commit-hooks/blob/master/pre_commit_hooks/check_executables_have_shebangs.py - files: \.(sh)$ - - id: check-shebang-scripts-are-executable - name: Checks that scripts with shebangs are executable. - description: https://github.com/pre-commit/pre-commit-hooks/blob/master/pre_commit_hooks/check_shebang_scripts_are_executable.py - files: \.(sh)$ + #- id: check-executables-have-shebangs + # name: Checks that non-binary executables have a proper shebang + # description: https://github.com/pre-commit/pre-commit-hooks/blob/master/pre_commit_hooks/check_executables_have_shebangs.py + # files: \.(sh)$ + #- id: check-shebang-scripts-are-executable + # name: Checks that scripts with shebangs are executable. + # description: https://github.com/pre-commit/pre-commit-hooks/blob/master/pre_commit_hooks/check_shebang_scripts_are_executable.py + # files: \.(sh)$ #- id: check-json # name: Attempts to load all json files to verify syntax. # description: https://github.com/pre-commit/pre-commit-hooks/blob/master/pre_commit_hooks/check_json.py @@ -52,19 +52,6 @@ repos: - id: yamlfmt args: [--mapping, "2", --sequence, "4", --offset, "2", --width, "88", --preserve-quotes] - # run shellcheck on Bash scripts - - repo: https://github.com/koalaman/shellcheck-precommit - rev: v0.10.0 - hooks: - - id: shellcheck - - # lint Dockerfile - - repo: https://github.com/hadolint/hadolint - rev: v2.12.1-beta - hooks: - - id: hadolint-docker - args: ["--ignore", "DL3007"] - # lint Makefile - repo: https://github.com/mrtazz/checkmake/ rev: 0.2.2 @@ -74,7 +61,7 @@ repos: # run semgrep on all known filetypes - repo: https://github.com/returntocorp/semgrep - rev: 'v1.66.0' + rev: 'v1.73.0' hooks: - id: semgrep # See https://semgrep.dev/explore to select a ruleset and copy its URL diff --git a/Makefile b/Makefile index e44ae9b..e623212 100644 --- a/Makefile +++ b/Makefile @@ -8,9 +8,6 @@ MAKEFLAGS += --no-builtin-rules .DEFAULT_GOAL := help # Build info -BUILDER = $(shell whoami)@$(shell hostname) -NOW = $(shell date -u +"%Y-%m-%dT%H:%M:%SZ") - OPTIMIZE = find $(CURDIR)/public/ -not -path "*/static/*" \( -name '*.png' -o -name '*.jpg' -o -name '*.jpeg' -o -name '*.JPG' \) -print0 | \ xargs -0 -P8 -n2 mogrify -strip -thumbnail '1000>' @@ -22,7 +19,7 @@ else OPENER=open endif -.PHONY: all pre-reqs pre-commit pre-commit-install pre-commit-run build deploy serve run clean help +.PHONY: all pre-reqs pre-commit pre-commit-install pre-commit-run build deploy serve run clean test help all: pre-reqs pre-commit clean build serve ## Default workflow @@ -49,8 +46,8 @@ pre-commit-install: ## Install pre-commit hooks and necessary binaries go install github.com/mrtazz/checkmake/cmd/checkmake@latest # syft command -v syft || curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b /usr/local/bin - # cosign - go install github.com/sigstore/cosign/cmd/cosign@latest + # pre-commit + command -v pre-commit || brew install pre-commit || sudo dnf install -y pre-commit || sudo apt install -y pre-commit # install and update pre-commits pre-commit install pre-commit autoupdate