Skip to content

Commit

Permalink
chore: Support .yml extension (#708)
Browse files Browse the repository at this point in the history
* Support .yml extension

Signed-off-by: Takahiro Nakayama <civitaspo@gmail.com>

* Update doc

Signed-off-by: Takahiro Nakayama <civitaspo@gmail.com>

---------

Signed-off-by: Takahiro Nakayama <civitaspo@gmail.com>
  • Loading branch information
civitaspo authored Jan 19, 2025
1 parent c67faa0 commit 939e08a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ index 84bd67a..5d92e44 100644
with:
path: prime-numbers
key: ${{ runner.os }}-primes

actionlint:
- uses: suzuki-shunsuke/actionlint-workflow/.github/workflows/actionlint.yaml@v0.5.0
+ uses: suzuki-shunsuke/actionlint-workflow/.github/workflows/actionlint.yaml@b6a5f966d4504893b2aeb60cf2b0de8946e48504 # v0.5.0
Expand Down Expand Up @@ -135,7 +135,7 @@ We develop GitHub Actions to pin GitHub Actions and reusable workflows by pinact

## Configuration

pinact supports a configuration file `.pinact.yaml` or `.github/pinact.yaml`.
pinact supports a configuration file `.pinact.yaml`, `.github/pinact.yaml`, `.pinact.yml` or `.github/pinact.yml`.
You can also specify the configuration file path by the environment variable `PINACT_CONFIG` or command line option `-c`.

.pinact.yaml
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/run/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ type IgnoreAction struct {
}

func getConfigPath(fs afero.Fs) (string, error) {
for _, path := range []string{".pinact.yaml", ".github/pinact.yaml"} {
for _, path := range []string{".pinact.yaml", ".github/pinact.yaml", ".pinact.yml", ".github/pinact.yml"} {
f, err := afero.Exists(fs, path)
if err != nil {
return "", fmt.Errorf("check if %s exists: %w", path, err)
Expand Down

0 comments on commit 939e08a

Please sign in to comment.