Skip to content

Commit

Permalink
Add initial GHA CI and pre-commit configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
berquist committed Sep 21, 2023
1 parent f0c60d9 commit 7ca3573
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/gha-updater.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: GitHub Actions Version Updater

# Controls when the action will run.
# yamllint disable-line rule:truthy
on:
schedule:
# Automatically run on every Sunday
- cron: "0 0 * * 0"

jobs:
gha-updater:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
# [Required] Access token with `workflow` scope.
token: ${{ secrets.WORKFLOW_SECRET }}
- name: Run GitHub Actions Version Updater
uses: saadmk11/github-actions-version-updater@v0.8.1
with:
# [Required] Access token with `workflow` scope.
token: ${{ secrets.WORKFLOW_SECRET }}
16 changes: 16 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
# In the absence of using the pre-commit.ci service...
name: pre-commit

# yamllint disable-line rule:truthy
on:
pull_request:
push:

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: pre-commit/action@v3.0.0
24 changes: 24 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
fail_fast: false
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: "v4.4.0"
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-json
- id: check-merge-conflict
- id: check-symlinks
- id: check-toml
- id: check-yaml
- id: end-of-file-fixer
- id: fix-byte-order-marker
- id: mixed-line-ending
args: [--fix, "lf"]
- id: no-commit-to-branch
args: [--branch, main, --branch, master, --branch, devel]
- id: trailing-whitespace
- repo: https://github.com/adrienverge/yamllint
rev: "v1.32.0"
hooks:
- id: yamllint

0 comments on commit 7ca3573

Please sign in to comment.