mirror of
https://github.com/ivuorinen/actions.git
synced 2026-01-26 03:23:59 +00:00
chore: markdown-table-formatter and formatting
This commit is contained in:
@@ -9,3 +9,5 @@ rules:
|
||||
check-keys: false
|
||||
comments:
|
||||
min-spaces-from-content: 1
|
||||
trailing-spaces:
|
||||
level: warning
|
||||
|
||||
@@ -9,7 +9,7 @@ Standardized caching strategy for all actions
|
||||
### Inputs
|
||||
|
||||
| name | description | required | default |
|
||||
| -------------- | ---------------------------------------------------- | -------- | ------- |
|
||||
|----------------|------------------------------------------------------|----------|---------|
|
||||
| `type` | <p>Type of cache (npm, composer, go, pip, etc.)</p> | `true` | `""` |
|
||||
| `paths` | <p>Paths to cache (comma-separated)</p> | `true` | `""` |
|
||||
| `key-prefix` | <p>Custom prefix for cache key</p> | `false` | `""` |
|
||||
@@ -20,7 +20,7 @@ Standardized caching strategy for all actions
|
||||
### Outputs
|
||||
|
||||
| name | description |
|
||||
| ------------- | --------------------------- |
|
||||
|---------------|-----------------------------|
|
||||
| `cache-hit` | <p>Cache hit indicator</p> |
|
||||
| `cache-key` | <p>Generated cache key</p> |
|
||||
| `cache-paths` | <p>Resolved cache paths</p> |
|
||||
|
||||
@@ -10,13 +10,13 @@ Emits an output 'found' which is true or false.
|
||||
### Inputs
|
||||
|
||||
| name | description | required | default |
|
||||
| -------------- | --------------------------------------- | -------- | ------- |
|
||||
|----------------|-----------------------------------------|----------|---------|
|
||||
| `file-pattern` | <p>Glob pattern for files to check.</p> | `true` | `""` |
|
||||
|
||||
### Outputs
|
||||
|
||||
| name | description |
|
||||
| ------- | -------------------------------------------------------------- |
|
||||
|---------|----------------------------------------------------------------|
|
||||
| `found` | <p>Indicates if the files matching the pattern were found.</p> |
|
||||
|
||||
### Runs
|
||||
|
||||
@@ -9,7 +9,7 @@ Builds and tests C# projects.
|
||||
### Inputs
|
||||
|
||||
| name | description | required | default |
|
||||
| ---------------- | ---------------------------------- | -------- | ------- |
|
||||
|------------------|------------------------------------|----------|---------|
|
||||
| `dotnet-version` | <p>Version of .NET SDK to use.</p> | `false` | `""` |
|
||||
|
||||
### Runs
|
||||
|
||||
@@ -9,7 +9,7 @@ Runs linters like StyleCop or dotnet-format for C# code style checks.
|
||||
### Inputs
|
||||
|
||||
| name | description | required | default |
|
||||
| ---------------- | ---------------------------------- | -------- | ------- |
|
||||
|------------------|------------------------------------|----------|---------|
|
||||
| `dotnet-version` | <p>Version of .NET SDK to use.</p> | `false` | `""` |
|
||||
|
||||
### Runs
|
||||
|
||||
@@ -9,7 +9,7 @@ Publishes a C# project to GitHub Packages.
|
||||
### Inputs
|
||||
|
||||
| name | description | required | default |
|
||||
| ---------------- | ---------------------------------------- | -------- | ----------- |
|
||||
|------------------|------------------------------------------|----------|-------------|
|
||||
| `dotnet-version` | <p>Version of .NET SDK to use.</p> | `false` | `""` |
|
||||
| `namespace` | <p>GitHub namespace for the package.</p> | `true` | `ivuorinen` |
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ Builds a Docker image for multiple architectures with enhanced security and reli
|
||||
### Inputs
|
||||
|
||||
| name | description | required | default |
|
||||
| --------------- | ----------------------------------------------------------------------------------- | -------- | --------------------------------------------------- |
|
||||
|-----------------|-------------------------------------------------------------------------------------|----------|-----------------------------------------------------|
|
||||
| `image-name` | <p>The name of the Docker image to build. Defaults to the repository name.</p> | `false` | `""` |
|
||||
| `tag` | <p>The tag for the Docker image. Must follow semver or valid Docker tag format.</p> | `true` | `""` |
|
||||
| `architectures` | <p>Comma-separated list of architectures to build for.</p> | `false` | `linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6` |
|
||||
@@ -23,7 +23,7 @@ Builds a Docker image for multiple architectures with enhanced security and reli
|
||||
### Outputs
|
||||
|
||||
| name | description |
|
||||
| -------------- | ------------------------------------ |
|
||||
|----------------|--------------------------------------|
|
||||
| `image-digest` | <p>The digest of the built image</p> |
|
||||
| `metadata` | <p>Build metadata in JSON format</p> |
|
||||
| `platforms` | <p>Successfully built platforms</p> |
|
||||
|
||||
@@ -9,7 +9,7 @@ Publishes a Docker image to GitHub Packages with advanced security and reliabili
|
||||
### Inputs
|
||||
|
||||
| name | description | required | default |
|
||||
| ------------- | -------------------------------------------------------------------------------- | -------- | ------------------------- |
|
||||
|---------------|----------------------------------------------------------------------------------|----------|---------------------------|
|
||||
| `image-name` | <p>The name of the Docker image to publish. Defaults to the repository name.</p> | `false` | `""` |
|
||||
| `tags` | <p>Comma-separated list of tags for the Docker image.</p> | `true` | `""` |
|
||||
| `platforms` | <p>Platforms to publish (comma-separated). Defaults to amd64 and arm64.</p> | `false` | `linux/amd64,linux/arm64` |
|
||||
@@ -23,7 +23,7 @@ Publishes a Docker image to GitHub Packages with advanced security and reliabili
|
||||
### Outputs
|
||||
|
||||
| name | description |
|
||||
| ------------ | ----------------------------------------- |
|
||||
|--------------|-------------------------------------------|
|
||||
| `image-name` | <p>Full image name including registry</p> |
|
||||
| `digest` | <p>The digest of the published image</p> |
|
||||
| `tags` | <p>List of published tags</p> |
|
||||
|
||||
@@ -9,7 +9,7 @@ Publishes a Docker image to Docker Hub with enhanced security and reliability fe
|
||||
### Inputs
|
||||
|
||||
| name | description | required | default |
|
||||
| ------------------------ | -------------------------------------------------------------------------------- | -------- | ------------------------- |
|
||||
|--------------------------|----------------------------------------------------------------------------------|----------|---------------------------|
|
||||
| `image-name` | <p>The name of the Docker image to publish. Defaults to the repository name.</p> | `false` | `""` |
|
||||
| `tags` | <p>Comma-separated list of tags for the Docker image.</p> | `true` | `""` |
|
||||
| `platforms` | <p>Platforms to publish (comma-separated). Defaults to amd64 and arm64.</p> | `false` | `linux/amd64,linux/arm64` |
|
||||
@@ -25,7 +25,7 @@ Publishes a Docker image to Docker Hub with enhanced security and reliability fe
|
||||
### Outputs
|
||||
|
||||
| name | description |
|
||||
| ------------ | ----------------------------------------- |
|
||||
|--------------|-------------------------------------------|
|
||||
| `image-name` | <p>Full image name including registry</p> |
|
||||
| `digest` | <p>The digest of the published image</p> |
|
||||
| `tags` | <p>List of published tags</p> |
|
||||
|
||||
@@ -9,14 +9,14 @@ Publish a Docker image to GitHub Packages and Docker Hub.
|
||||
### Inputs
|
||||
|
||||
| name | description | required | default |
|
||||
| ---------- | ----------------------------------------------------------- | -------- | ------- |
|
||||
|------------|-------------------------------------------------------------|----------|---------|
|
||||
| `registry` | <p>Registry to publish to (dockerhub, github, or both).</p> | `true` | `both` |
|
||||
| `nightly` | <p>Is this a nightly build? (true or false)</p> | `false` | `false` |
|
||||
|
||||
### Outputs
|
||||
|
||||
| name | description |
|
||||
| ---------- | ----------------------------------------- |
|
||||
|------------|-------------------------------------------|
|
||||
| `registry` | <p>Registry where image was published</p> |
|
||||
|
||||
### Runs
|
||||
|
||||
@@ -9,13 +9,13 @@ Detects .NET SDK version from global.json or defaults to a specified version.
|
||||
### Inputs
|
||||
|
||||
| name | description | required | default |
|
||||
| ----------------- | ------------------------------------------------------------------- | -------- | ------- |
|
||||
|-------------------|---------------------------------------------------------------------|----------|---------|
|
||||
| `default-version` | <p>Default .NET SDK version to use if global.json is not found.</p> | `true` | `7.0` |
|
||||
|
||||
### Outputs
|
||||
|
||||
| name | description |
|
||||
| ---------------- | -------------------------------------------- |
|
||||
|------------------|----------------------------------------------|
|
||||
| `dotnet-version` | <p>Detected or default .NET SDK version.</p> |
|
||||
|
||||
### Runs
|
||||
|
||||
@@ -9,7 +9,7 @@ Run ESLint check on the repository with advanced configuration and reporting
|
||||
### Inputs
|
||||
|
||||
| name | description | required | default |
|
||||
| ------------------- | ------------------------------------------------ | -------- | ------------------- |
|
||||
|---------------------|--------------------------------------------------|----------|---------------------|
|
||||
| `working-directory` | <p>Directory containing files to lint</p> | `false` | `.` |
|
||||
| `eslint-version` | <p>ESLint version to use</p> | `false` | `latest` |
|
||||
| `config-file` | <p>Path to ESLint config file</p> | `false` | `.eslintrc` |
|
||||
@@ -24,7 +24,7 @@ Run ESLint check on the repository with advanced configuration and reporting
|
||||
### Outputs
|
||||
|
||||
| name | description |
|
||||
| --------------- | -------------------------------- |
|
||||
|-----------------|----------------------------------|
|
||||
| `error-count` | <p>Number of errors found</p> |
|
||||
| `warning-count` | <p>Number of warnings found</p> |
|
||||
| `sarif-file` | <p>Path to SARIF report file</p> |
|
||||
|
||||
@@ -9,7 +9,7 @@ Creates a GitHub release with a version and changelog.
|
||||
### Inputs
|
||||
|
||||
| name | description | required | default |
|
||||
| ----------- | ---------------------------------------------------- | -------- | ------- |
|
||||
|-------------|------------------------------------------------------|----------|---------|
|
||||
| `version` | <p>The version for the release.</p> | `true` | `""` |
|
||||
| `changelog` | <p>The changelog or description for the release.</p> | `false` | `""` |
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ Builds the Go project.
|
||||
### Inputs
|
||||
|
||||
| name | description | required | default |
|
||||
| ------------- | ----------------------------------- | -------- | ------- |
|
||||
|---------------|-------------------------------------|----------|---------|
|
||||
| `go-version` | <p>Go version to use.</p> | `false` | `""` |
|
||||
| `destination` | <p>Build destination directory.</p> | `false` | `./bin` |
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ Run golangci-lint with advanced configuration, caching, and reporting
|
||||
### Inputs
|
||||
|
||||
| name | description | required | default |
|
||||
| ----------------------- | ---------------------------------------------------- | -------- | --------------- |
|
||||
|-------------------------|------------------------------------------------------|----------|-----------------|
|
||||
| `working-directory` | <p>Directory containing Go files</p> | `false` | `.` |
|
||||
| `golangci-lint-version` | <p>Version of golangci-lint to use</p> | `false` | `latest` |
|
||||
| `go-version` | <p>Go version to use</p> | `false` | `stable` |
|
||||
@@ -27,7 +27,7 @@ Run golangci-lint with advanced configuration, caching, and reporting
|
||||
### Outputs
|
||||
|
||||
| name | description |
|
||||
| ---------------- | ----------------------------------------- |
|
||||
|------------------|-------------------------------------------|
|
||||
| `error-count` | <p>Number of errors found</p> |
|
||||
| `sarif-file` | <p>Path to SARIF report file</p> |
|
||||
| `cache-hit` | <p>Indicates if there was a cache hit</p> |
|
||||
|
||||
@@ -9,13 +9,13 @@ Detects the Go version from the project's go.mod file or defaults to a specified
|
||||
### Inputs
|
||||
|
||||
| name | description | required | default |
|
||||
| ----------------- | -------------------------------------------------------- | -------- | ------- |
|
||||
|-------------------|----------------------------------------------------------|----------|---------|
|
||||
| `default-version` | <p>Default Go version to use if go.mod is not found.</p> | `false` | `1.22` |
|
||||
|
||||
### Outputs
|
||||
|
||||
| name | description |
|
||||
| ------------ | -------------------------------------- |
|
||||
|--------------|----------------------------------------|
|
||||
| `go-version` | <p>Detected or default Go version.</p> |
|
||||
|
||||
### Runs
|
||||
|
||||
@@ -9,7 +9,7 @@ Sets up Node.js environment with advanced version management, caching, and tooli
|
||||
### Inputs
|
||||
|
||||
| name | description | required | default |
|
||||
| ----------------- | ------------------------------------------------------------------------ | -------- | ---------------------------- |
|
||||
|-------------------|--------------------------------------------------------------------------|----------|------------------------------|
|
||||
| `default-version` | <p>Default Node.js version to use if no configuration file is found.</p> | `false` | `22` |
|
||||
| `package-manager` | <p>Node.js package manager to use (npm, yarn, pnpm)</p> | `false` | `npm` |
|
||||
| `registry-url` | <p>Custom NPM registry URL</p> | `false` | `https://registry.npmjs.org` |
|
||||
@@ -22,7 +22,7 @@ Sets up Node.js environment with advanced version management, caching, and tooli
|
||||
### Outputs
|
||||
|
||||
| name | description |
|
||||
| ----------------- | ----------------------------------------- |
|
||||
|-------------------|-------------------------------------------|
|
||||
| `node-version` | <p>Installed Node.js version</p> |
|
||||
| `package-manager` | <p>Selected package manager</p> |
|
||||
| `cache-hit` | <p>Indicates if there was a cache hit</p> |
|
||||
|
||||
@@ -9,7 +9,7 @@ Publishes the package to the NPM registry with configurable scope and registry U
|
||||
### Inputs
|
||||
|
||||
| name | description | required | default |
|
||||
| ----------------- | ----------------------------------- | -------- | -------------------------------------- |
|
||||
|-------------------|-------------------------------------|----------|----------------------------------------|
|
||||
| `registry-url` | <p>Registry URL for publishing.</p> | `false` | `https://registry.npmjs.org/` |
|
||||
| `scope` | <p>Package scope to use.</p> | `false` | `@ivuorinen` |
|
||||
| `package-version` | <p>The version to publish.</p> | `false` | `${{ github.event.release.tag_name }}` |
|
||||
|
||||
@@ -9,7 +9,7 @@ Runs Composer install on a repository with advanced caching and configuration.
|
||||
### Inputs
|
||||
|
||||
| name | description | required | default |
|
||||
| ------------------- | ------------------------------------------------------------- | -------- | --------------------------------------------------- |
|
||||
|---------------------|---------------------------------------------------------------|----------|-----------------------------------------------------|
|
||||
| `php` | <p>PHP Version to use.</p> | `true` | `8.4` |
|
||||
| `extensions` | <p>Comma-separated list of PHP extensions to install</p> | `false` | `mbstring, xml, zip, curl, json` |
|
||||
| `tools` | <p>Comma-separated list of Composer tools to install</p> | `false` | `composer:v2` |
|
||||
@@ -23,7 +23,7 @@ Runs Composer install on a repository with advanced caching and configuration.
|
||||
### Outputs
|
||||
|
||||
| name | description |
|
||||
| ------------------ | ----------------------------------------------- |
|
||||
|--------------------|-------------------------------------------------|
|
||||
| `lock` | <p>composer.lock or composer.json file hash</p> |
|
||||
| `php-version` | <p>Installed PHP version</p> |
|
||||
| `composer-version` | <p>Installed Composer version</p> |
|
||||
|
||||
@@ -9,7 +9,7 @@ Setup PHP, install dependencies, generate key, create database and run composer
|
||||
### Inputs
|
||||
|
||||
| name | description | required | default |
|
||||
| ------------------ | --------------------------------------------------------------------------------------------------------------------- | -------- | ------------------------------------------- |
|
||||
|--------------------|-----------------------------------------------------------------------------------------------------------------------|----------|---------------------------------------------|
|
||||
| `php-version` | <p>PHP Version to use, see https://github.com/marketplace/actions/setup-php-action#php-version-optional</p> | `false` | `latest` |
|
||||
| `php-version-file` | <p>PHP Version file to use, see https://github.com/marketplace/actions/setup-php-action#php-version-file-optional</p> | `false` | `.php-version` |
|
||||
| `extensions` | <p>PHP extensions to install, see https://github.com/marketplace/actions/setup-php-action#extensions-optional</p> | `false` | `mbstring, intl, json, pdo_sqlite, sqlite3` |
|
||||
@@ -18,7 +18,7 @@ Setup PHP, install dependencies, generate key, create database and run composer
|
||||
### Outputs
|
||||
|
||||
| name | description |
|
||||
| ------------------ | ---------------------------------------------- |
|
||||
|--------------------|------------------------------------------------|
|
||||
| `php-version` | <p>The PHP version that was setup</p> |
|
||||
| `php-version-file` | <p>The PHP version file that was used</p> |
|
||||
| `extensions` | <p>The PHP extensions that were installed</p> |
|
||||
|
||||
@@ -9,7 +9,7 @@ Runs pre-commit on the repository and pushes the fixes back to the repository
|
||||
### Inputs
|
||||
|
||||
| name | description | required | default |
|
||||
| ------------------- | ------------------------------------- | -------- | --------------------------- |
|
||||
|---------------------|---------------------------------------|----------|-----------------------------|
|
||||
| `pre-commit-config` | <p>pre-commit configuration file</p> | `false` | `.pre-commit-config.yaml` |
|
||||
| `base-branch` | <p>Base branch to compare against</p> | `false` | `""` |
|
||||
| `token` | <p>GitHub Token</p> | `false` | `${{ github.token }}` |
|
||||
|
||||
@@ -9,7 +9,7 @@ Run Prettier check on the repository with advanced configuration and reporting
|
||||
### Inputs
|
||||
|
||||
| name | description | required | default |
|
||||
| ------------------- | ---------------------------------------------------------- | -------- | ------------------------------------------------ |
|
||||
|---------------------|------------------------------------------------------------|----------|--------------------------------------------------|
|
||||
| `working-directory` | <p>Directory containing files to check</p> | `false` | `.` |
|
||||
| `prettier-version` | <p>Prettier version to use</p> | `false` | `latest` |
|
||||
| `config-file` | <p>Path to Prettier config file</p> | `false` | `.prettierrc` |
|
||||
@@ -25,7 +25,7 @@ Run Prettier check on the repository with advanced configuration and reporting
|
||||
### Outputs
|
||||
|
||||
| name | description |
|
||||
| ------------------- | --------------------------------------------- |
|
||||
|---------------------|-----------------------------------------------|
|
||||
| `files-checked` | <p>Number of files checked</p> |
|
||||
| `unformatted-files` | <p>Number of files with formatting issues</p> |
|
||||
| `sarif-file` | <p>Path to SARIF report file</p> |
|
||||
|
||||
@@ -9,7 +9,7 @@ Lints and fixes Python files, commits changes, and uploads SARIF report.
|
||||
### Inputs
|
||||
|
||||
| name | description | required | default |
|
||||
| ------------------- | --------------------------------------------------------------------- | -------- | ------- |
|
||||
|---------------------|-----------------------------------------------------------------------|----------|---------|
|
||||
| `python-version` | <p>Python version to use</p> | `false` | `3.11` |
|
||||
| `flake8-version` | <p>Flake8 version to use</p> | `false` | `7.0.0` |
|
||||
| `autopep8-version` | <p>Autopep8 version to use</p> | `false` | `2.0.4` |
|
||||
@@ -20,7 +20,7 @@ Lints and fixes Python files, commits changes, and uploads SARIF report.
|
||||
### Outputs
|
||||
|
||||
| name | description |
|
||||
| ------------- | ------------------------------------------------------ |
|
||||
|---------------|--------------------------------------------------------|
|
||||
| `lint-result` | <p>Result of the linting process (success/failure)</p> |
|
||||
| `fixed-files` | <p>Number of files that were fixed</p> |
|
||||
| `error-count` | <p>Number of errors found</p> |
|
||||
|
||||
@@ -9,7 +9,7 @@ Creates a release for the current month, incrementing patch number if necessary.
|
||||
### Inputs
|
||||
|
||||
| name | description | required | default |
|
||||
| --------- | -------------------------------------------------------- | -------- | --------------------- |
|
||||
|-----------|----------------------------------------------------------|----------|-----------------------|
|
||||
| `token` | <p>GitHub token with permission to create releases.</p> | `true` | `${{ github.token }}` |
|
||||
| `dry-run` | <p>Run in dry-run mode without creating the release.</p> | `false` | `false` |
|
||||
| `prefix` | <p>Optional prefix for release tags.</p> | `false` | `""` |
|
||||
@@ -17,7 +17,7 @@ Creates a release for the current month, incrementing patch number if necessary.
|
||||
### Outputs
|
||||
|
||||
| name | description |
|
||||
| -------------- | ------------------------------------- |
|
||||
|----------------|---------------------------------------|
|
||||
| `release-tag` | <p>The tag of the created release</p> |
|
||||
| `release-url` | <p>The URL of the created release</p> |
|
||||
| `previous-tag` | <p>The previous release tag</p> |
|
||||
|
||||
36
run.sh
36
run.sh
@@ -14,12 +14,12 @@ handle_error() {
|
||||
}
|
||||
trap 'handle_error $LINENO' ERR
|
||||
|
||||
echo "🚀 Aloitetaan päivitys $(date)"
|
||||
echo "🚀 Starting update $(date)"
|
||||
|
||||
# Check required tools
|
||||
for cmd in npx sed find grep; do
|
||||
if ! command -v $cmd &>/dev/null; then
|
||||
echo "⚠️ Error: $cmd not found" | tee -a "$log_file"
|
||||
echo "- ⚠️ Error: $cmd not found" | tee -a "$log_file"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
@@ -42,7 +42,7 @@ find . -mindepth 1 -maxdepth 1 -type d | while read -r dir; do
|
||||
action="./$dir/action.yml"
|
||||
|
||||
if [ -f "$action" ]; then
|
||||
echo "📄 Found action.yml in $dir"
|
||||
echo "- 📄 Found action.yml in $dir"
|
||||
|
||||
repo="ivuorinen/actions/$dir"
|
||||
readme="./$dir/README.md"
|
||||
@@ -51,35 +51,36 @@ find . -mindepth 1 -maxdepth 1 -type d | while read -r dir; do
|
||||
# if version doesn't exist, use 'main'
|
||||
if [ -z "$version" ]; then
|
||||
version="main"
|
||||
echo "ℹ️ Version not set in $dir/action.yml, using 'main'"
|
||||
echo "- ℹ️ Version not set in $dir/action.yml, using 'main'"
|
||||
fi
|
||||
|
||||
echo "📝 Updating $readme..."
|
||||
echo "- 📝 Updating $readme..."
|
||||
|
||||
printf "# %s\n\n" "$repo" >"$readme"
|
||||
|
||||
echo "📄 Generating action documentation..."
|
||||
echo "- 📄 Generating action documentation..."
|
||||
if ! npx --yes action-docs@latest \
|
||||
--source="$action" \
|
||||
--no-banner \
|
||||
--include-name-header >>"$readme"; then
|
||||
echo "⚠️ Warning: action-docs failed in $dir directory" | tee -a "$log_file"
|
||||
echo "- ⚠️ Warning: action-docs failed in $dir directory" | tee -a "$log_file"
|
||||
fi
|
||||
|
||||
echo "🔄 Replacing placeholders in $readme..."
|
||||
echo "- 🔄 Replacing placeholders in $readme..."
|
||||
$SED_CMD "s|PROJECT|$repo|g; s|VERSION|$version|g; s|\*\*\*||g" "$readme"
|
||||
|
||||
if [ -f "$readme.bak" ]; then
|
||||
rm "$readme.bak"
|
||||
echo "🗑️ Removed $readme.bak"
|
||||
echo "- 🗑️ Removed $readme.bak"
|
||||
fi
|
||||
else
|
||||
# if action doesn't exist, skip
|
||||
echo "⏩ Skipping $dir - action.yml missing"
|
||||
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
|
||||
echo ""
|
||||
|
||||
@@ -92,14 +93,21 @@ echo ""
|
||||
|
||||
echo "✨ Running prettier..."
|
||||
if ! npx --yes prettier --write \
|
||||
"run.sh" "**/README.md" "**/action.yml" ".github/workflows/*.yml"; then
|
||||
echo "⚠️ Warning: prettier formatting failed" | tee -a "$log_file"
|
||||
"**/README.md" "**/action.yml" ".github/workflows/*.yml"; then
|
||||
echo "- ⚠️ Warning: prettier formatting failed" | tee -a "$log_file"
|
||||
fi
|
||||
echo ""
|
||||
|
||||
# Run markdown-table-formatter
|
||||
echo "🔍 Running markdown-table-formatter..."
|
||||
if ! npx --yes markdown-table-formatter "**/README.md"; then
|
||||
echo "- ⚠️ Warning: markdown-table-formatter found issues" | tee -a "$log_file"
|
||||
fi
|
||||
echo ""
|
||||
|
||||
echo "🔎 Running MegaLinter..."
|
||||
if ! npx --yes mega-linter-runner; then
|
||||
echo "⚠️ Warning: MegaLinter found issues" | tee -a "$log_file"
|
||||
echo "- ⚠️ Warning: MegaLinter found issues" | tee -a "$log_file"
|
||||
fi
|
||||
echo ""
|
||||
|
||||
|
||||
@@ -8,19 +8,19 @@ Sets Git configuration for actions.
|
||||
|
||||
### Inputs
|
||||
|
||||
| name | description | required | default |
|
||||
| ---------- | ----------------------------------- | -------- | --------------------------- |
|
||||
| `token` | <p>GitHub token.</p> | `false` | `${{ github.token }}` |
|
||||
| `username` | <p>GitHub username for commits.</p> | `false` | `github-actions` |
|
||||
| `email` | <p>GitHub email for commits.</p> | `false` | `github-actions@github.com` |
|
||||
| name | description | required | default |
|
||||
|--------------|----------------------------------------|----------|-----------------------------|
|
||||
| `token` | <p>GitHub token.</p> | `false` | `${{ github.token }}` |
|
||||
| `username` | <p>GitHub username for commits.</p> | `false` | `github-actions` |
|
||||
| `email` | <p>GitHub email for commits.</p> | `false` | `github-actions@github.com` |
|
||||
|
||||
### Outputs
|
||||
|
||||
| name | description |
|
||||
| ---------- | ----------------------------------- |
|
||||
| `token` | <p>GitHub token.</p> |
|
||||
| `username` | <p>GitHub username for commits.</p> |
|
||||
| `email` | <p>GitHub email for commits.</p> |
|
||||
| name | description |
|
||||
|--------------|----------------------------------------|
|
||||
| `token` | <p>GitHub token.</p> |
|
||||
| `username` | <p>GitHub username for commits.</p> |
|
||||
| `email` | <p>GitHub email for commits.</p> |
|
||||
|
||||
### Runs
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@ runs:
|
||||
steps:
|
||||
- name: Check for FIXIMUS_TOKEN
|
||||
id: bot
|
||||
shell: bash
|
||||
run: |
|
||||
if [ -n "${{ secrets.FIXIMUS_TOKEN }}" ]; then
|
||||
echo "token=${{ secrets.FIXIMUS_TOKEN }}" >> $GITHUB_OUTPUT
|
||||
@@ -46,9 +47,9 @@ runs:
|
||||
echo "username=${{ inputs.username }}" >> $GITHUB_OUTPUT
|
||||
echo "email=${{ inputs.email }}" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
shell: bash
|
||||
|
||||
- name: Configure Git
|
||||
shell: bash
|
||||
run: |
|
||||
# Function to clean up Git config
|
||||
cleanup_git_config() {
|
||||
@@ -72,4 +73,3 @@ runs:
|
||||
'git@github.com:'
|
||||
git config --local user.name "${{ steps.bot.outputs.username }}"
|
||||
git config --local user.email "${{ steps.bot.outputs.email }}"
|
||||
shell: bash
|
||||
|
||||
@@ -9,13 +9,13 @@ Sync labels from a YAML file to a GitHub repository
|
||||
### Inputs
|
||||
|
||||
| name | description | required | default |
|
||||
| -------- | ----------------------------------- | -------- | ------------ |
|
||||
|----------|-------------------------------------|----------|--------------|
|
||||
| `labels` | <p>Path to the labels YAML file</p> | `true` | `labels.yml` |
|
||||
|
||||
### Outputs
|
||||
|
||||
| name | description |
|
||||
| -------- | ----------------------------------- |
|
||||
|----------|-------------------------------------|
|
||||
| `labels` | <p>Path to the labels YAML file</p> |
|
||||
|
||||
### Runs
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
---
|
||||
- name: breaking-change
|
||||
color: ee0701
|
||||
description: A breaking change for existing users.
|
||||
|
||||
@@ -9,7 +9,7 @@ Lints and fixes Terraform files with advanced validation and security checks.
|
||||
### Inputs
|
||||
|
||||
| name | description | required | default |
|
||||
| ------------------- | -------------------------------------------------------------- | -------- | ------------- |
|
||||
|---------------------|----------------------------------------------------------------|----------|---------------|
|
||||
| `terraform-version` | <p>Terraform version to use</p> | `false` | `latest` |
|
||||
| `tflint-version` | <p>TFLint version to use</p> | `false` | `latest` |
|
||||
| `working-directory` | <p>Directory containing Terraform files</p> | `false` | `.` |
|
||||
@@ -22,7 +22,7 @@ Lints and fixes Terraform files with advanced validation and security checks.
|
||||
### Outputs
|
||||
|
||||
| name | description |
|
||||
| ------------- | -------------------------------- |
|
||||
|---------------|----------------------------------|
|
||||
| `error-count` | <p>Number of errors found</p> |
|
||||
| `fixed-count` | <p>Number of issues fixed</p> |
|
||||
| `sarif-file` | <p>Path to SARIF report file</p> |
|
||||
|
||||
Reference in New Issue
Block a user