mirror of
https://github.com/ivuorinen/actions.git
synced 2026-01-26 11:34:00 +00:00
Compare commits
54 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
86387d514e | ||
|
|
7e1dd3050c | ||
|
|
1018ccd7fe | ||
|
|
59bd08c3c8 | ||
|
|
8476cd4675 | ||
|
|
743bd71d90 | ||
|
|
3cfe6722c4 | ||
|
|
625c37446b | ||
|
|
c35aa94d24 | ||
|
|
c0f919957e | ||
|
|
5ea5b9efae | ||
|
|
4c72f5c9be | ||
| 9480614ba2 | |||
| 99f3911475 | |||
|
|
1c171a4041 | ||
|
|
f5549d58f7 | ||
|
|
b73c36d4c4 | ||
|
|
05cd983353 | ||
|
|
9628916ec2 | ||
|
|
7b28f81e4d | ||
|
|
d0e84dc2cd | ||
|
|
97381caf80 | ||
|
|
d2412886ec | ||
|
|
663fcbc58b | ||
| fef32ab12b | |||
|
|
261011b054 | ||
| c2328922ab | |||
|
|
607d30ad0c | ||
|
|
d6d99b627e | ||
| baed29f713 | |||
|
|
598fe0190a | ||
|
|
5979943049 | ||
|
|
245d8a9c98 | ||
|
|
140177528b | ||
|
|
deb8ece950 | ||
|
|
8d9f6811d7 | ||
|
|
2be873ebc8 | ||
|
|
644f3dec68 | ||
|
|
300d2020d4 | ||
|
|
edb5db7b56 | ||
|
|
a5f52ee093 | ||
|
|
279ab4ac65 | ||
|
|
43b434e851 | ||
|
|
e43606fd65 | ||
|
|
1d7df0f36a | ||
|
|
5362920418 | ||
|
|
32f37d64d3 | ||
|
|
ccdc7a5625 | ||
|
|
6e052e68fc | ||
|
|
802e1e94e3 | ||
|
|
359f34ac20 | ||
|
|
aa4c2076c6 | ||
|
|
d513dde74c | ||
| 312c00f77f |
8
.github/workflows/action-security.yml
vendored
8
.github/workflows/action-security.yml
vendored
@@ -58,7 +58,7 @@ jobs:
|
||||
fi
|
||||
|
||||
- name: Run actionlint
|
||||
uses: raven-actions/actionlint@01fce4f43a270a612932cb1c64d40505a029f821 # v2.0.0
|
||||
uses: raven-actions/actionlint@3a24062651993d40fed1019b58ac6fbdfbf276cc # v2.0.1
|
||||
with:
|
||||
cache: true
|
||||
fail-on-error: true
|
||||
@@ -66,7 +66,7 @@ jobs:
|
||||
|
||||
- name: Run Gitleaks
|
||||
if: steps.check-configs.outputs.run_gitleaks == 'true'
|
||||
uses: gitleaks/gitleaks-action@83373cf2f8c4db6e24b41c1a9b086bb9619e9cd3 # v2.3.7
|
||||
uses: gitleaks/gitleaks-action@ff98106e4c7b2bc287b24eaf42907196329070c7 # v2.3.9
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GITLEAKS_LICENSE: ${{ secrets.GITLEAKS_LICENSE }}
|
||||
@@ -117,14 +117,14 @@ jobs:
|
||||
|
||||
- name: Upload Trivy results
|
||||
if: steps.verify-sarif.outputs.has_trivy == 'true'
|
||||
uses: github/codeql-action/upload-sarif@1b549b9259bda1cb5ddde3b41741a82a2d15a841 # v3.28.13
|
||||
uses: github/codeql-action/upload-sarif@51f77329afa6477de8c49fc9c7046c15b9a4e79d # v3.29.5
|
||||
with:
|
||||
sarif_file: 'trivy-results.sarif'
|
||||
category: 'trivy'
|
||||
|
||||
- name: Upload Gitleaks results
|
||||
if: steps.verify-sarif.outputs.has_gitleaks == 'true'
|
||||
uses: github/codeql-action/upload-sarif@1b549b9259bda1cb5ddde3b41741a82a2d15a841 # v3.28.13
|
||||
uses: github/codeql-action/upload-sarif@51f77329afa6477de8c49fc9c7046c15b9a4e79d # v3.29.5
|
||||
with:
|
||||
sarif_file: 'gitleaks-report.sarif'
|
||||
category: 'gitleaks'
|
||||
|
||||
6
.github/workflows/codeql.yml
vendored
6
.github/workflows/codeql.yml
vendored
@@ -32,15 +32,15 @@ jobs:
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@1b549b9259bda1cb5ddde3b41741a82a2d15a841 # v3.28.13
|
||||
uses: github/codeql-action/init@51f77329afa6477de8c49fc9c7046c15b9a4e79d # v3.29.5
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
queries: security-and-quality
|
||||
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@1b549b9259bda1cb5ddde3b41741a82a2d15a841 # v3.28.13
|
||||
uses: github/codeql-action/autobuild@51f77329afa6477de8c49fc9c7046c15b9a4e79d # v3.29.5
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@1b549b9259bda1cb5ddde3b41741a82a2d15a841 # v3.28.13
|
||||
uses: github/codeql-action/analyze@51f77329afa6477de8c49fc9c7046c15b9a4e79d # v3.29.5
|
||||
with:
|
||||
category: '/language:${{matrix.language}}'
|
||||
|
||||
2
.github/workflows/dependency-review.yml
vendored
2
.github/workflows/dependency-review.yml
vendored
@@ -13,4 +13,4 @@ jobs:
|
||||
- name: 'Checkout Repository'
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
- name: 'Dependency Review'
|
||||
uses: actions/dependency-review-action@ce3cf9537a52e8119d91fd484ab5b8a807627bf8 # v4.6.0
|
||||
uses: actions/dependency-review-action@da24556b548a50705dd671f47852072ea4c105d9 # v4.7.1
|
||||
|
||||
2
.github/workflows/new-release.yml
vendored
2
.github/workflows/new-release.yml
vendored
@@ -36,7 +36,7 @@ jobs:
|
||||
|
||||
- name: Create release
|
||||
if: steps.daily-version.outputs.created
|
||||
uses: ncipollo/release-action@440c8c1cb0ed28b9f43e4d1d670870f059653174 # v1.16.0
|
||||
uses: ncipollo/release-action@bcfe5470707e8832e12347755757cec0eb3c22af # v1.18.0
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
|
||||
20
.github/workflows/pr-lint.yml
vendored
20
.github/workflows/pr-lint.yml
vendored
@@ -69,21 +69,7 @@ jobs:
|
||||
|
||||
- name: MegaLinter
|
||||
id: ml
|
||||
uses: oxsecurity/megalinter/flavors/cupcake@146333030da68e2e58c6ff826633824fabe01eaf # v8.5.0
|
||||
env:
|
||||
PARALLEL: true # Run linters in parallel
|
||||
FILTER_REGEX_EXCLUDE: '(\.automation/test|docs/json-schemas|\.github/workflows)'
|
||||
|
||||
# Error configuration
|
||||
ERROR_ON_MISSING_EXEC_BIT: true
|
||||
CLEAR_REPORT_FOLDER: true
|
||||
PRINT_ALPACA: false
|
||||
SHOW_ELAPSED_TIME: true
|
||||
|
||||
# File configuration
|
||||
YAML_YAMLLINT_CONFIG_FILE: .yamllint.yml
|
||||
YAML_PRETTIER_CONFIG_FILE: .prettierrc.yml
|
||||
YAML_YAMLLINT_FILTER_REGEX_EXCLUDE: '(\.automation/test|docs/json-schemas|\.github/workflows)'
|
||||
uses: oxsecurity/megalinter/flavors/cupcake@e08c2b05e3dbc40af4c23f41172ef1e068a7d651 # v8.8.0
|
||||
|
||||
- name: Check MegaLinter Results
|
||||
id: check-results
|
||||
@@ -113,7 +99,7 @@ jobs:
|
||||
|
||||
- name: Upload SARIF Report
|
||||
if: always() && hashFiles('megalinter-reports/sarif/*.sarif')
|
||||
uses: github/codeql-action/upload-sarif@1b549b9259bda1cb5ddde3b41741a82a2d15a841 # v3.28.13
|
||||
uses: github/codeql-action/upload-sarif@51f77329afa6477de8c49fc9c7046c15b9a4e79d # v3.29.5
|
||||
with:
|
||||
sarif_file: megalinter-reports/sarif
|
||||
category: megalinter
|
||||
@@ -168,7 +154,7 @@ jobs:
|
||||
github.ref != 'refs/heads/main' &&
|
||||
(github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository) &&
|
||||
!contains(github.event.head_commit.message, 'skip fix')
|
||||
uses: stefanzweifel/git-auto-commit-action@e348103e9026cc0eee72ae06630dbe30c8bf7a79 # v5.1.0
|
||||
uses: stefanzweifel/git-auto-commit-action@778341af668090896ca464160c2def5d1d1a3eb0 # v6.0.1
|
||||
with:
|
||||
branch: ${{ github.event.pull_request.head.ref || github.head_ref || github.ref }}
|
||||
commit_message: |
|
||||
|
||||
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@@ -17,6 +17,6 @@ jobs:
|
||||
contents: write
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
- uses: softprops/action-gh-release@c95fe1489396fe8a9eb87c0abf8aa5b2ef267fda # v2.2.1
|
||||
- uses: softprops/action-gh-release@72f2c25fcb47643c292f7107632f7a47c1df5cd8 # v2.3.2
|
||||
with:
|
||||
generate_release_notes: true
|
||||
|
||||
12
.github/workflows/security-suite.yml
vendored
12
.github/workflows/security-suite.yml
vendored
@@ -87,7 +87,7 @@ jobs:
|
||||
--enableExperimental
|
||||
--failOnCVSS 7
|
||||
- name: Upload OWASP Results
|
||||
uses: github/codeql-action/upload-sarif@1b549b9259bda1cb5ddde3b41741a82a2d15a841 # v3.28.13
|
||||
uses: github/codeql-action/upload-sarif@51f77329afa6477de8c49fc9c7046c15b9a4e79d # v3.29.5
|
||||
with:
|
||||
sarif_file: reports/dependency-check-report.sarif
|
||||
category: owasp-dependency-check
|
||||
@@ -107,7 +107,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
- uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
|
||||
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
||||
with:
|
||||
node-version: 'lts/*'
|
||||
cache: 'npm'
|
||||
@@ -119,7 +119,7 @@ jobs:
|
||||
with:
|
||||
args: --all-projects --sarif-file-output=snyk-results.sarif
|
||||
- name: Upload Snyk Results
|
||||
uses: github/codeql-action/upload-sarif@1b549b9259bda1cb5ddde3b41741a82a2d15a841 # v3.28.13
|
||||
uses: github/codeql-action/upload-sarif@51f77329afa6477de8c49fc9c7046c15b9a4e79d # v3.29.5
|
||||
with:
|
||||
sarif_file: snyk-results.sarif
|
||||
category: snyk
|
||||
@@ -140,13 +140,13 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
- name: Run Scorecard
|
||||
uses: ossf/scorecard-action@f49aabe0b5af0936a0987cfb85d86b75731b0186 # v2.4.1
|
||||
uses: ossf/scorecard-action@05b42c624433fc40578a4040d5cf5e36ddca8cde # v2.4.2
|
||||
with:
|
||||
results_file: scorecard-results.sarif
|
||||
results_format: sarif
|
||||
publish_results: true
|
||||
- name: Upload Scorecard Results
|
||||
uses: github/codeql-action/upload-sarif@1b549b9259bda1cb5ddde3b41741a82a2d15a841 # v3.28.13
|
||||
uses: github/codeql-action/upload-sarif@51f77329afa6477de8c49fc9c7046c15b9a4e79d # v3.29.5
|
||||
with:
|
||||
sarif_file: scorecard-results.sarif
|
||||
category: scorecard
|
||||
@@ -168,7 +168,7 @@ jobs:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
|
||||
- name: Download scan results
|
||||
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
|
||||
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
|
||||
with:
|
||||
path: ./results
|
||||
|
||||
|
||||
@@ -32,4 +32,4 @@ JAVASCRIPT_ES_CONFIG_FILE: .eslintrc.json
|
||||
TYPESCRIPT_ES_CONFIG_FILE: .eslintrc.json
|
||||
|
||||
FILTER_REGEX_EXCLUDE: >
|
||||
(node_modules|\.automation/test|docs/json-schemas|\.github/workflows)
|
||||
(node_modules|\.automation/test|docs/json-schemas)
|
||||
|
||||
@@ -29,12 +29,12 @@ repos:
|
||||
args: [-c, .markdownlint.json, --fix]
|
||||
|
||||
- repo: https://github.com/adrienverge/yamllint
|
||||
rev: v1.35.1
|
||||
rev: v1.37.0
|
||||
hooks:
|
||||
- id: yamllint
|
||||
|
||||
- repo: https://github.com/scop/pre-commit-shfmt
|
||||
rev: v3.10.0-2
|
||||
rev: v3.11.0-1
|
||||
hooks:
|
||||
- id: shfmt
|
||||
|
||||
@@ -51,12 +51,12 @@ repos:
|
||||
args: ['-shellcheck=']
|
||||
|
||||
- repo: https://github.com/renovatebot/pre-commit-hooks
|
||||
rev: 39.156.0
|
||||
rev: 39.227.2
|
||||
hooks:
|
||||
- id: renovate-config-validator
|
||||
|
||||
- repo: https://github.com/bridgecrewio/checkov.git
|
||||
rev: '3.2.360'
|
||||
rev: '3.2.400'
|
||||
hooks:
|
||||
- id: checkov
|
||||
args:
|
||||
|
||||
56
README.md
56
README.md
@@ -2,14 +2,20 @@
|
||||
|
||||
## Overview
|
||||
|
||||
This project contains a collection of workflows and composable actions to streamline CI/CD
|
||||
processes and ensure code quality. Below is a categorized list of all workflows, grouped by their types.
|
||||
This project contains a collection of workflows and composable actions to streamline CI/CD processes and ensure code quality. The actions are grouped by purpose for easier discovery.
|
||||
|
||||
## Testing Workflows
|
||||
## Setup & Caching
|
||||
|
||||
- [PHP Tests][php-tests]: Runs PHPUnit tests to ensure PHP code correctness.
|
||||
- [Node Setup][node-setup]: Sets up Node.js with caching and tooling.
|
||||
- [PHP Composer][php-composer]: Installs PHP dependencies using Composer.
|
||||
- [Dotnet Version Detect][dotnet-v-detect]: Detects the required .NET version from `global.json`.
|
||||
- [Go Version Detect][go-version-detect]: Detects the required Go version from configuration files.
|
||||
- [Common Cache][common-cache]: Provides a consistent caching strategy for multiple languages.
|
||||
- [Set Git Config][set-git-config]: Configures Git user information for automated commits.
|
||||
|
||||
## Linting and Formatting Workflows
|
||||
## Linting & Formatting
|
||||
|
||||
### Code Linting
|
||||
|
||||
- [Ansible Lint and Fix][ansible-lint-fix]: Lints and fixes Ansible playbooks and roles.
|
||||
- [Biome Check][biome-check]: Runs Biome to lint multiple languages and formats.
|
||||
@@ -18,40 +24,46 @@ processes and ensure code quality. Below is a categorized list of all workflows,
|
||||
- [ESLint Check][eslint-check]: Runs ESLint to check for code style violations.
|
||||
- [ESLint Fix][eslint-fix]: Automatically fixes code style issues with ESLint.
|
||||
- [Go Lint Check][go-lint]: Lints Go code using `golangci-lint`.
|
||||
- [PR Lint][pr-lint]: Runs MegaLinter against pull requests.
|
||||
- [Python Lint and Fix][python-lint-fix]: Lints and fixes Python code using `flake8` and `black`.
|
||||
- [Terraform Lint and Fix][terraform-lint-fix]: Lints and fixes Terraform configurations.
|
||||
|
||||
### Code Formatting
|
||||
|
||||
- [Prettier Check][prettier-check]: Checks code formatting using Prettier.
|
||||
- [Prettier Fix][prettier-fix]: Automatically fixes code formatting with Prettier.
|
||||
- [Python Lint and Fix][python-lint-fix]: Lints and fixes Python code using `flake8` and `black`.
|
||||
- [Terraform Lint and Fix][terraform-lint-fix]: Lints and fixes Terraform
|
||||
configurations.
|
||||
- [Pre-Commit][pre-commit]: Runs `pre-commit` hooks to enforce code quality standards.
|
||||
|
||||
## Build Workflows
|
||||
## Testing
|
||||
|
||||
- [PHP Tests][php-tests]: Runs PHPUnit tests to ensure PHP code correctness.
|
||||
- [Laravel PHPUnit][php-laravel-phpunit]: Sets up Laravel and runs Composer tests.
|
||||
|
||||
## Build & Package
|
||||
|
||||
- [C# Build][csharp-build]: Builds C# projects using the .NET SDK.
|
||||
- [Docker Build][docker-build]: Builds Docker images using a Dockerfile.
|
||||
- [Go Build][go-build]: Builds Go projects using the `go build` command.
|
||||
- [Docker Build][docker-build]: Builds Docker images using a Dockerfile.
|
||||
|
||||
## Deployment Workflows
|
||||
## Publish & Deployment
|
||||
|
||||
- [C# Publish][csharp-publish]: Publishes .NET projects to an output directory.
|
||||
- [Docker Publish][docker-publish]: Publishes Docker images to GitHub Packages and Docker Hub.
|
||||
- [Docker Publish to Docker Hub][docker-publish-hub]: Publishes Docker images to Docker Hub.
|
||||
- [Docker Publish to GitHub Packages][docker-publish-gh]: Publishes Docker images to GitHub's Container Registry.
|
||||
- [Publish to NPM][npm-publish]: Publishes packages to the NPM registry.
|
||||
|
||||
## Release Workflows
|
||||
## Release Management
|
||||
|
||||
- [GitHub Release][github-release]: Automates GitHub release creation with custom tags and notes.
|
||||
- [Release Monthly][release-monthly]: Creates a monthly GitHub release with autogenerated notes.
|
||||
|
||||
## Utility Workflows
|
||||
## Repository Maintenance
|
||||
|
||||
- [Common File Check][common-file-check]: Checks for the presence of specific files based on a glob pattern.
|
||||
- [Compress Images][compress-images]: Optimizes and creates a pull request with compressed images.
|
||||
- [Dotnet Version Detect][dotnet-v-detect]: Detects the required .NET version from `global.json`.
|
||||
- [Go Version Detect][go-version-detect]: Detects the required Go version from configuration files.
|
||||
- [Node Setup][node-setup]: Sets up a Node.js environment for workflows.
|
||||
- [PHP Composer][php-composer]: Installs PHP dependencies using Composer.
|
||||
- [Pre-Commit][pre-commit]: Runs `pre-commit` hooks to enforce code quality standards.
|
||||
- [Set Git Config][set-git-config]: Configures Git user information for automated commits.
|
||||
- [Stale][stale]: Closes stale issues and pull requests automatically.
|
||||
- [Sync Labels][sync-labels]: Syncs repository labels from a YAML file.
|
||||
|
||||
## License
|
||||
|
||||
@@ -60,12 +72,14 @@ This project is licensed under the MIT License. See the [LICENSE](LICENSE.md) fi
|
||||
[ansible-lint-fix]: ansible-lint-fix/README.md
|
||||
[biome-check]: biome-check/README.md
|
||||
[biome-fix]: biome-fix/README.md
|
||||
[common-cache]: common-cache/README.md
|
||||
[common-file-check]: common-file-check/README.md
|
||||
[compress-images]: compress-images/README.md
|
||||
[csharp-build]: csharp-build/README.md
|
||||
[csharp-lint-check]: csharp-lint-check/README.md
|
||||
[csharp-publish]: csharp-publish/README.md
|
||||
[docker-build]: docker-build/README.md
|
||||
[docker-publish]: docker-publish/README.md
|
||||
[docker-publish-gh]: docker-publish-gh/README.md
|
||||
[docker-publish-hub]: docker-publish-hub/README.md
|
||||
[dotnet-v-detect]: dotnet-version-detect/README.md
|
||||
@@ -78,11 +92,15 @@ This project is licensed under the MIT License. See the [LICENSE](LICENSE.md) fi
|
||||
[node-setup]: node-setup/README.md
|
||||
[npm-publish]: npm-publish/README.md
|
||||
[php-composer]: php-composer/README.md
|
||||
[php-laravel-phpunit]: php-laravel-phpunit/README.md
|
||||
[php-tests]: php-tests/README.md
|
||||
[pr-lint]: pr-lint/README.md
|
||||
[pre-commit]: pre-commit/README.md
|
||||
[prettier-check]: prettier-check/README.md
|
||||
[prettier-fix]: prettier-fix/README.md
|
||||
[python-lint-fix]: python-lint-fix/README.md
|
||||
[release-monthly]: release-monthly/README.md
|
||||
[set-git-config]: set-git-config/README.md
|
||||
[stale]: stale/README.md
|
||||
[sync-labels]: sync-labels/README.md
|
||||
[terraform-lint-fix]: terraform-lint-fix/README.md
|
||||
|
||||
@@ -47,6 +47,6 @@ runs:
|
||||
fi
|
||||
|
||||
- name: Upload SARIF Report
|
||||
uses: github/codeql-action/upload-sarif@1b549b9259bda1cb5ddde3b41741a82a2d15a841 # v3.28.13
|
||||
uses: github/codeql-action/upload-sarif@51f77329afa6477de8c49fc9c7046c15b9a4e79d # v3.29.5
|
||||
with:
|
||||
sarif_file: ansible-lint.sarif
|
||||
|
||||
@@ -31,6 +31,6 @@ runs:
|
||||
biome check . --json > biome-report.json
|
||||
|
||||
- name: Upload Biome Results
|
||||
uses: github/codeql-action/upload-sarif@1b549b9259bda1cb5ddde3b41741a82a2d15a841 # v3.28.13
|
||||
uses: github/codeql-action/upload-sarif@51f77329afa6477de8c49fc9c7046c15b9a4e79d # v3.29.5
|
||||
with:
|
||||
sarif_file: biome-report.json
|
||||
|
||||
@@ -32,7 +32,7 @@ runs:
|
||||
|
||||
- name: Push Fixes
|
||||
if: success()
|
||||
uses: stefanzweifel/git-auto-commit-action@e348103e9026cc0eee72ae06630dbe30c8bf7a79 # v5.1.0
|
||||
uses: stefanzweifel/git-auto-commit-action@778341af668090896ca464160c2def5d1d1a3eb0 # v6.0.1
|
||||
with:
|
||||
commit_message: 'style: autofix Biome violations'
|
||||
add_options: '-u'
|
||||
|
||||
@@ -40,6 +40,6 @@ runs:
|
||||
fi
|
||||
|
||||
- name: Upload SARIF Report
|
||||
uses: github/codeql-action/upload-sarif@1b549b9259bda1cb5ddde3b41741a82a2d15a841 # v3.28.13
|
||||
uses: github/codeql-action/upload-sarif@51f77329afa6477de8c49fc9c7046c15b9a4e79d # v3.29.5
|
||||
with:
|
||||
sarif_file: dotnet-format.sarif
|
||||
|
||||
@@ -98,7 +98,7 @@ runs:
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
id: buildx
|
||||
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0
|
||||
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
|
||||
with:
|
||||
version: latest
|
||||
platforms: ${{ inputs.architectures }}
|
||||
|
||||
@@ -102,7 +102,7 @@ runs:
|
||||
platforms: ${{ inputs.platforms }}
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0
|
||||
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
|
||||
with:
|
||||
platforms: ${{ inputs.platforms }}
|
||||
|
||||
@@ -141,7 +141,7 @@ runs:
|
||||
|
||||
- name: Set up Cosign
|
||||
if: inputs.provenance == 'true'
|
||||
uses: sigstore/cosign-installer@d7d6bc7722e3daa8354c50bcb52f4837da5e9b6a # v3.8.1
|
||||
uses: sigstore/cosign-installer@d58896d6a1865668819e1d91763c7751a165e159 # v3.9.2
|
||||
|
||||
- name: Publish Image
|
||||
id: publish
|
||||
|
||||
@@ -110,7 +110,7 @@ runs:
|
||||
platforms: ${{ inputs.platforms }}
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0
|
||||
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
|
||||
with:
|
||||
platforms: ${{ inputs.platforms }}
|
||||
|
||||
@@ -151,7 +151,7 @@ runs:
|
||||
|
||||
- name: Set up Cosign
|
||||
if: inputs.provenance == 'true'
|
||||
uses: sigstore/cosign-installer@d7d6bc7722e3daa8354c50bcb52f4837da5e9b6a # v3.8.1
|
||||
uses: sigstore/cosign-installer@d58896d6a1865668819e1d91763c7751a165e159 # v3.9.2
|
||||
|
||||
- name: Update Docker Hub Description
|
||||
if: inputs.repository-description != '' || inputs.readme-file != ''
|
||||
|
||||
@@ -239,7 +239,7 @@ runs:
|
||||
|
||||
- name: Upload ESLint Results
|
||||
if: always() && inputs.report-format == 'sarif'
|
||||
uses: github/codeql-action/upload-sarif@1b549b9259bda1cb5ddde3b41741a82a2d15a841 # v3.28.13
|
||||
uses: github/codeql-action/upload-sarif@51f77329afa6477de8c49fc9c7046c15b9a4e79d # v3.29.5
|
||||
with:
|
||||
sarif_file: ${{ inputs.working-directory }}/reports/eslint.sarif
|
||||
category: eslint
|
||||
|
||||
@@ -32,7 +32,7 @@ runs:
|
||||
|
||||
- name: Push Fixes
|
||||
if: always()
|
||||
uses: stefanzweifel/git-auto-commit-action@e348103e9026cc0eee72ae06630dbe30c8bf7a79 # v5.1.0
|
||||
uses: stefanzweifel/git-auto-commit-action@778341af668090896ca464160c2def5d1d1a3eb0 # v6.0.1
|
||||
with:
|
||||
commit_message: 'style: autofix ESLint violations'
|
||||
add_options: '-u'
|
||||
|
||||
@@ -24,7 +24,7 @@ runs:
|
||||
uses: ivuorinen/actions/go-version-detect@main
|
||||
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
|
||||
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
|
||||
with:
|
||||
go-version: '${{ steps.detect-go-version.outputs.go-version }}'
|
||||
|
||||
|
||||
@@ -106,7 +106,7 @@ runs:
|
||||
done
|
||||
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
|
||||
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
|
||||
with:
|
||||
go-version: ${{ inputs.go-version }}
|
||||
cache: true
|
||||
@@ -266,7 +266,7 @@ runs:
|
||||
|
||||
- name: Upload Lint Results
|
||||
if: always() && inputs.report-format == 'sarif'
|
||||
uses: github/codeql-action/upload-sarif@1b549b9259bda1cb5ddde3b41741a82a2d15a841 # v3.28.13
|
||||
uses: github/codeql-action/upload-sarif@51f77329afa6477de8c49fc9c7046c15b9a4e79d # v3.29.5
|
||||
with:
|
||||
sarif_file: ${{ inputs.working-directory }}/reports/golangci-lint.sarif
|
||||
category: golangci-lint
|
||||
|
||||
@@ -161,7 +161,7 @@ runs:
|
||||
|
||||
- name: Setup Node.js
|
||||
id: setup
|
||||
uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
|
||||
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
||||
with:
|
||||
node-version: ${{ steps.version.outputs.version }}
|
||||
registry-url: ${{ inputs.registry-url }}
|
||||
|
||||
@@ -29,7 +29,7 @@ runs:
|
||||
# ╰──────────────────────────────────────────────────────────╯
|
||||
- name: Setup Git Config
|
||||
id: git-config
|
||||
uses: ivuorinen/actions/set-git-config@730304e2936e7afeab4ac5652d448d0ded2fbe4b # 25.4.5
|
||||
uses: ivuorinen/actions/set-git-config@1018ccd7fe3d4520222a558d7d5f701515c45af0 # 25.7.28
|
||||
|
||||
# ╭──────────────────────────────────────────────────────────╮
|
||||
# │ Install packages for linting │
|
||||
@@ -46,14 +46,26 @@ runs:
|
||||
|
||||
- name: Setup Node.js and run tests
|
||||
if: steps.detect-node.outputs.found == 'true'
|
||||
uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
|
||||
with:
|
||||
cache: 'npm'
|
||||
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
||||
|
||||
- name: Install Node.js dependencies
|
||||
if: steps.detect-node.outputs.found == 'true'
|
||||
shell: bash
|
||||
run: npm ci
|
||||
run: |
|
||||
if [ -f pnpm-lock.yaml ]; then
|
||||
npm install -g pnpm
|
||||
pnpm install
|
||||
elif [ -f yarn.lock ]; then
|
||||
npm install -g yarn
|
||||
yarn install
|
||||
elif [ -f package-lock.json ]; then
|
||||
if ! npm ci; then
|
||||
echo "::warning ::npm ci failed – falling back to npm install (lockfile drift?)"
|
||||
npm install
|
||||
fi
|
||||
else
|
||||
echo "No supported lockfile found, skipping Node.js dependencies installation."
|
||||
fi
|
||||
|
||||
# PHP tests if composer.json exists
|
||||
- name: Detect composer.json
|
||||
@@ -94,7 +106,7 @@ runs:
|
||||
|
||||
- name: Setup Python
|
||||
if: steps.detect-python.outputs.found == 'true'
|
||||
uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
|
||||
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
|
||||
with:
|
||||
cache: 'pip'
|
||||
|
||||
@@ -114,7 +126,7 @@ runs:
|
||||
|
||||
- name: Setup Go
|
||||
if: steps.detect-go.outputs.found == 'true'
|
||||
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
|
||||
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
|
||||
with:
|
||||
go-version-file: 'go.mod'
|
||||
cache: true
|
||||
@@ -125,7 +137,7 @@ runs:
|
||||
- name: MegaLinter
|
||||
# You can override MegaLinter flavor used to have faster performances
|
||||
# More info at https://megalinter.io/latest/flavors/
|
||||
uses: oxsecurity/megalinter@146333030da68e2e58c6ff826633824fabe01eaf # v8.5.0
|
||||
uses: oxsecurity/megalinter/flavors/cupcake@e08c2b05e3dbc40af4c23f41172ef1e068a7d651 # v8.8.0
|
||||
id: ml
|
||||
|
||||
# All available variables are described in documentation
|
||||
@@ -239,7 +251,7 @@ runs:
|
||||
run: sudo chown -Rc $UID .git/
|
||||
|
||||
- name: Commit and push applied linter fixes
|
||||
uses: stefanzweifel/git-auto-commit-action@e348103e9026cc0eee72ae06630dbe30c8bf7a79 # v5.1.0
|
||||
uses: stefanzweifel/git-auto-commit-action@778341af668090896ca464160c2def5d1d1a3eb0 # v6.0.1
|
||||
if: env.APPLY_FIXES_IF_COMMIT == 'true'
|
||||
with:
|
||||
branch: >-
|
||||
|
||||
@@ -56,7 +56,7 @@ runs:
|
||||
|
||||
- name: Push pre-commit fixes
|
||||
if: always() # Push changes even when pre-commit fails
|
||||
uses: stefanzweifel/git-auto-commit-action@e348103e9026cc0eee72ae06630dbe30c8bf7a79 # v5.1.0
|
||||
uses: stefanzweifel/git-auto-commit-action@778341af668090896ca464160c2def5d1d1a3eb0 # v6.0.1
|
||||
with:
|
||||
commit_message: 'style(pre-commit): autofix'
|
||||
add_options: -u
|
||||
|
||||
@@ -305,7 +305,7 @@ runs:
|
||||
|
||||
- name: Upload Prettier Results
|
||||
if: always() && inputs.report-format == 'sarif'
|
||||
uses: github/codeql-action/upload-sarif@1b549b9259bda1cb5ddde3b41741a82a2d15a841 # v3.28.13
|
||||
uses: github/codeql-action/upload-sarif@51f77329afa6477de8c49fc9c7046c15b9a4e79d # v3.29.5
|
||||
with:
|
||||
sarif_file: ${{ inputs.working-directory }}/reports/prettier.sarif
|
||||
category: prettier
|
||||
|
||||
@@ -32,7 +32,7 @@ runs:
|
||||
|
||||
- name: Push Fixes
|
||||
if: always()
|
||||
uses: stefanzweifel/git-auto-commit-action@e348103e9026cc0eee72ae06630dbe30c8bf7a79 # v5.1.0
|
||||
uses: stefanzweifel/git-auto-commit-action@778341af668090896ca464160c2def5d1d1a3eb0 # v6.0.1
|
||||
with:
|
||||
commit_message: 'style: autofix Prettier violations'
|
||||
add_options: '-u'
|
||||
|
||||
@@ -49,7 +49,7 @@ runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
|
||||
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
|
||||
with:
|
||||
python-version: ${{ inputs.python-version }}
|
||||
cache: 'pip'
|
||||
@@ -213,7 +213,7 @@ runs:
|
||||
|
||||
- name: Upload SARIF Report
|
||||
if: steps.check-files.outputs.result == 'found'
|
||||
uses: github/codeql-action/upload-sarif@1b549b9259bda1cb5ddde3b41741a82a2d15a841 # v3.28.13
|
||||
uses: github/codeql-action/upload-sarif@51f77329afa6477de8c49fc9c7046c15b9a4e79d # v3.29.5
|
||||
with:
|
||||
sarif_file: ${{ inputs.working-directory }}/reports/flake8.sarif
|
||||
category: 'python-lint'
|
||||
|
||||
5
run.sh
5
run.sh
@@ -78,7 +78,8 @@ find . -mindepth 1 -maxdepth 1 -type d | while read -r dir; do
|
||||
echo "- ⏩ Skipping $dir - action.yml missing"
|
||||
fi
|
||||
) || {
|
||||
echo "- ⚠️ Warning: Error processing directory $dir" | tee -a "$log_file"
|
||||
echo "- ⚠️ Warning: Error processing directory $dir" |
|
||||
tee -a "$log_file"
|
||||
}
|
||||
echo ""
|
||||
done
|
||||
@@ -106,7 +107,7 @@ fi
|
||||
echo ""
|
||||
|
||||
echo "🔎 Running MegaLinter..."
|
||||
if ! npx --yes mega-linter-runner; then
|
||||
if ! npx --yes mega-linter-runner --flavor cupcake --fix --remove-container --container-name cupcake; then
|
||||
echo "- ⚠️ Warning: MegaLinter found issues" | tee -a "$log_file"
|
||||
fi
|
||||
echo ""
|
||||
|
||||
@@ -225,7 +225,7 @@ runs:
|
||||
|
||||
- name: Upload SARIF Report
|
||||
if: steps.check-files.outputs.found == 'true' && inputs.format == 'sarif'
|
||||
uses: github/codeql-action/upload-sarif@1b549b9259bda1cb5ddde3b41741a82a2d15a841 # v3.28.13
|
||||
uses: github/codeql-action/upload-sarif@51f77329afa6477de8c49fc9c7046c15b9a4e79d # v3.29.5
|
||||
with:
|
||||
sarif_file: ${{ inputs.working-directory }}/reports/tflint.sarif
|
||||
category: terraform-lint
|
||||
|
||||
Reference in New Issue
Block a user