forked from pre-commit/action
-
-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathREADME.yaml
More file actions
91 lines (72 loc) · 2.35 KB
/
Copy pathREADME.yaml
File metadata and controls
91 lines (72 loc) · 2.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#
# This is the canonical configuration for the `README.md`
# Run `make readme` to rebuild the `README.md`
#
# Name of this project
name: github-action-pre-commit
# Tags of this project
tags:
- github-action
# License of this project
license: "APACHE2"
# Canonical GitHub repo
github_repo: cloudposse/github-action-pre-commit
# Badges to display
badges:
- name: Latest Release
image: https://img.shields.io/github/release/cloudposse/github-action-pre-commit.svg?style=for-the-badge
url: https://github.com/cloudposse/github-action-pre-commit/releases/latest
- name: Last Updated
image: https://img.shields.io/github/last-commit/cloudposse/github-action-pre-commit.svg?style=for-the-badge
url: https://github.com/cloudposse/github-action-pre-commit/commits
- name: Slack Community
image: https://slack.cloudposse.com/for-the-badge.svg
url: https://cloudposse.com/slack
# List any related terraform modules that this module may be used with or that this module depends on.
related: []
# Short description of this project
description: A GitHub action to run pre-commit
introduction: |-
This action is a fork of [pre-commit/action](https://github.com/pre-commit/action)
that adds optional features for private repositories.
Permissions required: `repo` and `workflow`.
references:
- name: "github-actions-workflows"
description: "Reusable workflows for different types of projects"
url: "https://github.com/cloudposse/github-actions-workflows"
# How to use this project
usage: |-
```yaml
name: pre-commit
on:
pull_request:
push:
branches: [main]
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: cloudposse/github-action-pre-commit@v4.0.0
```
To run a specific hook or pass custom arguments:
```yaml
- uses: cloudposse/github-action-pre-commit@v4.0.0
with:
extra_args: flake8 --all-files
```
For private repositories, configure push-back support:
```yaml
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: cloudposse/github-action-pre-commit@v4.0.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
git_user_name: pre-commit
git_user_email: pre-commit@users.noreply.github.com
git_commit_message: pre-commit fixes
```
include: []
contributors: []