Fix: Linting, stale permissions, tweaks

This commit is contained in:
2023-05-04 15:40:11 +03:00
parent 15ac8b6bef
commit 744a067468
11 changed files with 36 additions and 20 deletions

View File

@@ -39,3 +39,6 @@ tab_width = 4
[{*.tf,*.tfvars}]
tab_width = 4
[*.md,.github/workflows/*.yml]
max_line_length = 300

View File

@@ -5,8 +5,8 @@ on:
workflow_dispatch:
pull_request:
paths:
- 'composer.json'
- 'composer.lock'
- "composer.json"
- "composer.lock"
jobs:
ComposerInstall:

View File

@@ -5,7 +5,7 @@ name: Compress Images on Demand
on:
workflow_dispatch:
schedule:
- cron: '00 23 * * 0'
- cron: "00 23 * * 0"
jobs:
CompressOnDemandOrSchedule:
name: calibreapp/image-actions

View File

@@ -8,7 +8,7 @@
#
# Source repository: https://github.com/actions/dependency-review-action
# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement
name: 'Dependency Review'
name: "Dependency Review"
on: [pull_request]
@@ -19,8 +19,8 @@ jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
- name: "Checkout Repository"
uses: actions/checkout@v3
- name: 'Dependency Review'
- name: "Dependency Review"
uses: actions/dependency-review-action@v3

View File

@@ -15,7 +15,7 @@ jobs:
steps:
- uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
php-version: "8.1"
- uses: actions/checkout@v3

View File

@@ -5,10 +5,10 @@ on:
# Run Image Actions when JPG, JPEG, PNG or WebP files are added or changed.
# See https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#onpushpull_requestpaths for reference.
paths:
- '**.jpg'
- '**.jpeg'
- '**.png'
- '**.webp'
- "**.jpg"
- "**.jpeg"
- "**.png"
- "**.webp"
jobs:
CompressInPR:
# Only run on Pull Requests within the same repository, and not from forks.

View File

@@ -8,6 +8,12 @@ on:
workflow_call:
workflow_dispatch:
permissions:
contents: write # only for delete-branch option
issues: write
pull-requests: write
jobs:
stale:
name: 🧹 Clean up stale issues and PRs

View File

@@ -29,7 +29,7 @@ jobs:
--source \
--limit 25 \
--json nameWithOwner -q '.[] | .nameWithOwner' \
| sed 's|\"||'
| sed 's|\"||'
)"
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)

1
.shellcheckrc Normal file
View File

@@ -0,0 +1 @@
disable=SC2129,SC2086

View File

@@ -4,12 +4,12 @@ extends: default
ignore-from-file: .gitignore
yaml-files:
- '*.yaml'
- '*.yml'
- '.yamllint.yml'
- "*.yaml"
- "*.yml"
- ".yamllint.yml"
rules:
line-length:
max: 120
max: 300
level: warning
truthy: disable

View File

@@ -4,7 +4,9 @@ My Shared GitHub Actions & Configurations.
## Actions
Actions should be linked using the `uses` keyword. Read more from the Reusing workflows article [Calling a reusable workflow](https://docs.github.com/en/actions/using-workflows/reusing-workflows#calling-a-reusable-workflow) and [jobs.<job_id>.steps[*].uses](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsuses) configuration documentation.
Actions should be linked using the `uses` keyword. Read more from the Reusing workflows
article [Calling a reusable workflow][reusable] and [jobs.<job_id>.steps[\*].uses][jobs]
configuration documentation.
```yml
jobs:
@@ -14,7 +16,7 @@ jobs:
ReusableMatrixJobForComposerInstall:
strategy:
matrix:
target: ['8.0', '8.1', '8.2']
target: ["8.0", "8.1", "8.2"]
uses: ivuorinen/.github/workflows/composer-install.yml@main
with:
php-versions: ${{ matrix.target }}
@@ -24,12 +26,16 @@ jobs:
### Renovate config
Go through [the onboarding process](https://docs.renovatebot.com/getting-started/installing-onboarding/) and save the following snippet as `.github/renovate.json`.
Go through [the onboarding process][onboarding] and save
the following snippet as `.github/renovate.json`.
```json
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["github>ivuorinen/.github:renovate-config"]
}
```
[reusable]: https://docs.github.com/en/actions/using-workflows/reusing-workflows#calling-a-reusable-workflow
[jobs]: https://docs.github.com/en/actions/using-workflows/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsuses
[onboarding]: https://docs.renovatebot.com/getting-started/installing-onboarding