mirror of
https://github.com/ivuorinen/actions.git
synced 2026-02-07 16:44:52 +00:00
Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4e3e2a559e | ||
|
|
80f0e018cd | ||
|
|
d0687ee76e | ||
|
|
fd3c871d7d | ||
|
|
7de94a65a6 | ||
|
|
8112d86ab7 | ||
|
|
22ca79df3c | ||
|
|
953659172d | ||
| 5c5f1c3d54 | |||
|
|
8599e8913f |
2
.github/workflows/build-testing-image.yml
vendored
2
.github/workflows/build-testing-image.yml
vendored
@@ -49,7 +49,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Extract metadata
|
- name: Extract metadata
|
||||||
id: meta
|
id: meta
|
||||||
uses: docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f # v5.8.0
|
uses: docker/metadata-action@318604b99e75e41977312d83839a89be02ca4893 # v5.9.0
|
||||||
with:
|
with:
|
||||||
images: ghcr.io/${{ github.repository_owner }}/actions
|
images: ghcr.io/${{ github.repository_owner }}/actions
|
||||||
tags: |
|
tags: |
|
||||||
|
|||||||
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@@ -17,6 +17,6 @@ jobs:
|
|||||||
contents: write
|
contents: write
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
- uses: softprops/action-gh-release@6da8fa9354ddfdc4aeace5fc48d7f679b5214090 # v2.4.1
|
- uses: softprops/action-gh-release@5be0e66d93ac7ed76da52eca8bb058f665c3a5fe # v2.4.2
|
||||||
with:
|
with:
|
||||||
generate_release_notes: true
|
generate_release_notes: true
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ repos:
|
|||||||
types: [markdown, python, yaml]
|
types: [markdown, python, yaml]
|
||||||
files: ^(docs/.*|README\.md|CONTRIBUTING\.md|CHANGELOG\.md|.*\.py|.*\.ya?ml)$
|
files: ^(docs/.*|README\.md|CONTRIBUTING\.md|CHANGELOG\.md|.*\.py|.*\.ya?ml)$
|
||||||
- repo: https://github.com/astral-sh/uv-pre-commit
|
- repo: https://github.com/astral-sh/uv-pre-commit
|
||||||
rev: 0.9.5
|
rev: 0.9.8
|
||||||
hooks:
|
hooks:
|
||||||
- id: uv-lock
|
- id: uv-lock
|
||||||
- id: uv-sync
|
- id: uv-sync
|
||||||
@@ -55,7 +55,7 @@ repos:
|
|||||||
- id: yamllint
|
- id: yamllint
|
||||||
|
|
||||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||||
rev: v0.14.2
|
rev: v0.14.4
|
||||||
hooks:
|
hooks:
|
||||||
# Run the linter with auto-fix
|
# Run the linter with auto-fix
|
||||||
- id: ruff-check
|
- id: ruff-check
|
||||||
@@ -84,7 +84,7 @@ repos:
|
|||||||
args: ['-shellcheck=']
|
args: ['-shellcheck=']
|
||||||
|
|
||||||
- repo: https://github.com/renovatebot/pre-commit-hooks
|
- repo: https://github.com/renovatebot/pre-commit-hooks
|
||||||
rev: 41.159.4
|
rev: 42.6.2
|
||||||
hooks:
|
hooks:
|
||||||
- id: renovate-config-validator
|
- id: renovate-config-validator
|
||||||
|
|
||||||
@@ -96,6 +96,6 @@ repos:
|
|||||||
- '--quiet'
|
- '--quiet'
|
||||||
|
|
||||||
- repo: https://github.com/gitleaks/gitleaks
|
- repo: https://github.com/gitleaks/gitleaks
|
||||||
rev: v8.28.0
|
rev: v8.29.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: gitleaks
|
- id: gitleaks
|
||||||
|
|||||||
@@ -169,7 +169,7 @@ runs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0
|
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0
|
||||||
with:
|
with:
|
||||||
platforms: ${{ inputs.architectures }}
|
platforms: ${{ inputs.architectures }}
|
||||||
|
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ runs:
|
|||||||
done
|
done
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0
|
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0
|
||||||
with:
|
with:
|
||||||
platforms: ${{ inputs.platforms }}
|
platforms: ${{ inputs.platforms }}
|
||||||
|
|
||||||
|
|||||||
@@ -157,7 +157,7 @@ runs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0
|
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0
|
||||||
with:
|
with:
|
||||||
platforms: ${{ inputs.platforms }}
|
platforms: ${{ inputs.platforms }}
|
||||||
|
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ runs:
|
|||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
with:
|
with:
|
||||||
token: ${{ inputs.token || github.token }}
|
token: ${{ inputs.token || github.token }}
|
||||||
|
ref: ${{ github.event.pull_request.head.ref || github.head_ref || github.ref_name }}
|
||||||
|
|
||||||
# If you use VALIDATE_ALL_CODEBASE = true, you can remove this line to
|
# If you use VALIDATE_ALL_CODEBASE = true, you can remove this line to
|
||||||
# improve performance
|
# improve performance
|
||||||
@@ -220,7 +221,7 @@ runs:
|
|||||||
contains(fromJSON('["refs/heads/main", "refs/heads/master"]'), github.ref)
|
contains(fromJSON('["refs/heads/main", "refs/heads/master"]'), github.ref)
|
||||||
}}
|
}}
|
||||||
|
|
||||||
GITHUB_TOKEN: ${{ steps.git-config.outputs.token || inputs.token }}
|
GITHUB_TOKEN: ${{ steps.git-config.outputs.token || inputs.token || github.token }}
|
||||||
|
|
||||||
# Apply linter fixes configuration
|
# Apply linter fixes configuration
|
||||||
#
|
#
|
||||||
@@ -300,7 +301,7 @@ runs:
|
|||||||
id: cpr
|
id: cpr
|
||||||
if: env.APPLY_FIXES_IF_PR == 'true'
|
if: env.APPLY_FIXES_IF_PR == 'true'
|
||||||
with:
|
with:
|
||||||
token: ${{ steps.git-config.outputs.token || inputs.token }}
|
token: ${{ steps.git-config.outputs.token || inputs.token || github.token }}
|
||||||
commit-message: '[MegaLinter] Apply linters automatic fixes'
|
commit-message: '[MegaLinter] Apply linters automatic fixes'
|
||||||
title: '[MegaLinter] Apply linters automatic fixes'
|
title: '[MegaLinter] Apply linters automatic fixes'
|
||||||
labels: bot
|
labels: bot
|
||||||
@@ -322,10 +323,33 @@ runs:
|
|||||||
- name: Prepare commit
|
- name: Prepare commit
|
||||||
if: env.APPLY_FIXES_IF_COMMIT == 'true'
|
if: env.APPLY_FIXES_IF_COMMIT == 'true'
|
||||||
shell: bash
|
shell: bash
|
||||||
|
env:
|
||||||
|
BRANCH_REF: >-
|
||||||
|
${{
|
||||||
|
github.event.pull_request.head.ref ||
|
||||||
|
github.head_ref ||
|
||||||
|
github.ref_name
|
||||||
|
}}
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
sudo chown -Rc $UID .git/
|
# Fix .git directory ownership after MegaLinter container execution
|
||||||
|
sudo chown -Rc "$UID" .git/
|
||||||
|
|
||||||
|
# Ensure we're on the correct branch (not in detached HEAD state)
|
||||||
|
# This is necessary because MegaLinter may leave the repo in a detached HEAD state
|
||||||
|
current_branch=$(git rev-parse --abbrev-ref HEAD)
|
||||||
|
if [ "$current_branch" = "HEAD" ]; then
|
||||||
|
echo "Repository is in detached HEAD state, checking out $BRANCH_REF"
|
||||||
|
# Validate branch reference to prevent command injection
|
||||||
|
if ! git check-ref-format --branch "$BRANCH_REF"; then
|
||||||
|
echo "::error::Invalid branch reference format: $BRANCH_REF"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
git checkout "$BRANCH_REF"
|
||||||
|
else
|
||||||
|
echo "Repository is on branch: $current_branch"
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Commit and push applied linter fixes
|
- name: Commit and push applied linter fixes
|
||||||
uses: stefanzweifel/git-auto-commit-action@28e16e81777b558cc906c8750092100bbb34c5e3 # v7.0.0
|
uses: stefanzweifel/git-auto-commit-action@28e16e81777b558cc906c8750092100bbb34c5e3 # v7.0.0
|
||||||
|
|||||||
Reference in New Issue
Block a user