Skip to content

Commit

Permalink
Follow the latest plugin-template
Browse files Browse the repository at this point in the history
  • Loading branch information
yacchi committed Oct 25, 2023
1 parent 8a0f862 commit 542b28f
Show file tree
Hide file tree
Showing 9 changed files with 54 additions and 31 deletions.
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
31 changes: 10 additions & 21 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,18 @@ on:
pull_request:

jobs:
shellcheck:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: asdf-vm/actions/install@v2
- run: scripts/lint.bash

- name: Install asdf dependencies
uses: asdf-vm/actions/install@v1

- name: Run ShellCheck
run: scripts/shellcheck.bash

shellfmt:
actionlint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Install asdf dependencies
uses: asdf-vm/actions/install@v1

- name: List file to shfmt
run: shfmt -f .

- name: Run shfmt
run: scripts/shfmt.bash
- uses: actions/checkout@v3
- name: Check workflow files
uses: docker://rhysd/actionlint:1.6.23
with:
args: -color
6 changes: 5 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,14 @@ on:
branches:
- main

permissions:
contents: write
pull-requests: write

jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: GoogleCloudPlatform/release-please-action@v2
- uses: GoogleCloudPlatform/release-please-action@v3
with:
release-type: simple
18 changes: 18 additions & 0 deletions .github/workflows/semantic-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Lint

on:
pull_request_target:
types:
- opened
- edited
- synchronize

jobs:
semantic-pr:
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5.2.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
validateSingleCommit: true
4 changes: 2 additions & 2 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
shellcheck 0.7.1
shfmt 3.3.0
shellcheck 0.9.0
shfmt 3.6.0
4 changes: 4 additions & 0 deletions scripts/format.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env bash

shfmt --language-dialect bash --write \
./**/*
9 changes: 9 additions & 0 deletions scripts/lint.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash

shellcheck --shell=bash --external-sources \
bin/* --source-path=template/lib/ \
lib/* \
scripts/*

shfmt --language-dialect bash --diff \
./**/*
4 changes: 0 additions & 4 deletions scripts/shellcheck.bash

This file was deleted.

3 changes: 0 additions & 3 deletions scripts/shfmt.bash

This file was deleted.

0 comments on commit 542b28f

Please sign in to comment.