Skip to content

fix: Re-added .githooks dir. Not sure how that got deleted. #321

fix: Re-added .githooks dir. Not sure how that got deleted.

fix: Re-added .githooks dir. Not sure how that got deleted. #321

---
# This workflow uses actions that are not certified by GitHub. They are provided
# by a third-party and are governed by separate terms of service, privacy
# policy, and support documentation.
name: Auto-update on push
on:
workflow_dispatch:
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# Declare default permissions as read only.
permissions: read-all
jobs:
update_on_push_job:
runs-on: ubuntu-latest
name: Auto-update on push
permissions:
contents: write
steps:
- name: Harden Runner
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
with:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
api.cloudflare.com:443
api.deps.dev:443
api.github.com:443
api.gumroad.com:443
api.osv.dev:443
api.scorecard.dev:443
api.securityscorecards.dev:443
checkpoint-api.hashicorp.com:443
fulcio.sigstore.dev:443
get.opentofu.org:443
ghcr.io:443
github.com:443
gitlab.com:443
golang.org:443
goreleaser.com:443
objects.githubusercontent.com:443
oss-fuzz-build-logs.storage.googleapis.com:443
osv-vulnerabilities.storage.googleapis.com:443
pkg-containers.githubusercontent.com:443
proxy.golang.org:443
registry.npmjs.org:443
rekor.sigstore.dev:443
releases.hashicorp.com:443
release-assets.githubusercontent.com:443
storage.googleapis.com:443
sum.golang.org:443
tuf-repo-cdn.sigstore.dev:443
uploads.github.com:443
vuln.go.dev:443
www.bestpractices.dev:443
- name: Install Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: "20"
token: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout Source
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
fetch-depth: 0
- name: Generate Changelog
uses: orhun/git-cliff-action@98c93442bb05a455a77bee982867857ae748eeea # v4.5.1
with:
config: cliff.toml
args: --verbose
env:
OUTPUT: CHANGELOG.md
- name: Remove git-cliff artifacts
run: |
rm -Rf git-cliff*
- name: Generate artifacts
run: |
# Generate list of authors
./scripts/generate-contributors.sh
- name: Git commit if changed
run: |
git config user.name "Northwood Labs (Bot)"
git config user.email "bot@northwood-labs.com"
set +e
git add .
git status | grep modified
if [ $? -eq 0 ]; then
git commit -a -m "automation: Updated AUTHORS and CHANGELOG on $(date)."
git push https://${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git main
fi