Skip to content

Commit

Permalink
Update workflow files
Browse files Browse the repository at this point in the history
  • Loading branch information
vbem committed Feb 20, 2024
1 parent 573a667 commit e7eb67c
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 16 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/keepalive.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@ name: keepalive.test
on:
push:
branches: [master, main]
paths: ['.github/workflows/keepalive.*']
paths: [".github/workflows/keepalive.*"]
workflow_dispatch:

jobs:
calling:
permissions:
contents: write
uses: ./.github/workflows/keepalive.yml
...
9 changes: 4 additions & 5 deletions .github/workflows/keepalive.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@ on:
workflow_call: # https://docs.github.com/en/actions/using-workflows/reusing-workflows
inputs:
timezone:
description: 'The timezone, defaults to `Asia/Shanghai`'
description: "The timezone, defaults to `Asia/Shanghai`"
type: string
required: false
default: 'Asia/Shanghai'
default: "Asia/Shanghai"
runs-on:
description: 'The jobs.<job_id>.runs-on, defaults to `["ubuntu-latest"]`'
type: string
required: false
default: '["ubuntu-latest"]'
commit-message:
description: 'Commit message used while committing to the repo, defaults to `[skip actions] ${github.workflow}`'
description: "Commit message used while committing to the repo, defaults to `[skip actions] ${github.workflow}`"
type: string
required: false
default: '[skip actions] ${{ github.workflow }}'
default: "[skip actions] ${{ github.workflow }}"

env:
TZ: ${{ inputs.timezone }}
Expand All @@ -43,4 +43,3 @@ jobs:
with:
# https://docs.github.com/en/actions/managing-workflow-runs/skipping-workflow-runs
commit_message: ${{ inputs.commit-message }}
...
3 changes: 1 addition & 2 deletions .github/workflows/superlinter.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ concurrency:
on:
push:
branches: [master, main]
paths: ['.github/workflows/superlinter.*']
paths: [".github/workflows/superlinter.*"]
workflow_dispatch:

jobs:
Expand All @@ -18,4 +18,3 @@ jobs:
packages: read
statuses: write
uses: ./.github/workflows/superlinter.yml
...
11 changes: 5 additions & 6 deletions .github/workflows/superlinter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ on:
workflow_call: # https://docs.github.com/en/actions/using-workflows/reusing-workflows
inputs:
timezone:
description: 'The timezone, defaults to `Asia/Shanghai`'
description: "The timezone, defaults to `Asia/Shanghai`"
type: string
required: false
default: 'Asia/Shanghai'
default: "Asia/Shanghai"
runs-on:
description: 'The jobs.<job_id>.runs-on, defaults to `["ubuntu-latest"]`'
type: string
required: false
default: '["ubuntu-latest"]'
inject-rules-from-reusable:
description: 'Whether inject predefined rules from reusable workflow, defaults to `true`'
description: "Whether inject predefined rules from reusable workflow, defaults to `true`"
type: boolean
required: false
default: true
Expand Down Expand Up @@ -71,8 +71,7 @@ jobs:
SUPPRESS_POSSUM: true
DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
GITHUB_TOKEN: ${{ github.token }}
GITHUB_ACTIONS_COMMAND_ARGS: '-ignore label.+unknown' # https://github.com/rhysd/actionlint/blob/main/docs/usage.md#super-linter
GITHUB_ACTIONS_COMMAND_ARGS: "-ignore label.+unknown" # https://github.com/rhysd/actionlint/blob/main/docs/usage.md#super-linter
HADOLINT_FAILURE_THRESHOLD: error # https://github.com/hadolint/hadolint#configure
SHELLCHECK_OPTS: '--severity=warning' # https://github.com/koalaman/shellcheck#pre-commit
SHELLCHECK_OPTS: "--severity=warning" # https://github.com/koalaman/shellcheck#pre-commit
VALIDATE_BASH_EXEC: false
...
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
# Yet another repository of reusable workflows

[![Static Badge](https://img.shields.io/badge/GitHub%20Actions-reusable%20workflows-blue?logo=github)](https://docs.github.com/en/actions/using-workflows/reusing-workflows)
[![GitHub](https://img.shields.io/github/license/vbem/reusable?color=blue)](LICENSE)
[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/vbem/reusable?label=Release&logo=github)](https://github.com/vbem/reusable/releases)
[![superlinter.test](https://github.com/vbem/reusable/actions/workflows/superlinter.test.yml/badge.svg)](https://github.com/vbem/reusable/actions/workflows/superlinter.test.yml)
[![keepalive.test](https://github.com/vbem/reusable/actions/workflows/keepalive.test.yml/badge.svg)](https://github.com/vbem/reusable/actions/workflows/keepalive.test.yml)

## `superlinter`

[`superlinter.yml`](.github/workflows/superlinter.yml) predefined generic configurations for the well-known [*Super-Linter* action](https://github.com/marketplace/actions/super-linter). Create `.github/workflows/linter.yaml` in your repository:

```yaml
---
name: Linter
Expand All @@ -31,7 +34,9 @@ jobs:
```

## `keepalive`

[`keepalive.yml`](.github/workflows/keepalive.yml) is a wrapper the well-known [*Keepalive Workflow* action](https://github.com/marketplace/actions/keepalive-workflow). Create `.github/workflows/alive.yaml` in your repository:

```yaml
---
name: Alive
Expand All @@ -46,4 +51,4 @@ jobs:
contents: write
uses: vbem/reusable/.github/workflows/keepalive.yml@v1
...
```
```

0 comments on commit e7eb67c

Please sign in to comment.