Skip to content

Commit

Permalink
feat: add gha linting workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
mrcdb committed May 10, 2023
1 parent ecca5d6 commit 38e320d
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/lint-docker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Linting - Dockerfile
on:
pull_request:
branches: [main]
paths:
- "**Dockerfile"
- "**Dockerfile*"

jobs:
hadolint:
name: hadolint
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2

- name: Run hadolint
uses: reviewdog/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-pr-review
22 changes: 22 additions & 0 deletions .github/workflows/lint-yaml.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Linting - YAML
on:
pull_request:
branches: [main]
paths:
- "**.yml"
- "**.yaml"

jobs:
yamllint:
name: yamllint
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2

- name: Run yamllint
uses: reviewdog/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-pr-review
28 changes: 28 additions & 0 deletions .github/workflows/stale.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# This workflow warns and then closes issues and PRs that have had no activity for a specified amount of time.
#
# You can adjust the behavior by modifying this file.
# For more information, see:
# https://github.com/actions/stale
---
name: Mark stale issues and pull requests

on:
schedule:
- cron: '22 16 * * *'

jobs:
stale:

runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write

steps:
- uses: actions/stale@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'Stale issue message'
stale-pr-message: 'Stale pull request message'
stale-issue-label: 'no-issue-activity'
stale-pr-label: 'no-pr-activity'

0 comments on commit 38e320d

Please sign in to comment.