Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/__greetings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ permissions: {}

jobs:
greetings:
uses: hoverkraft-tech/ci-github-common/.github/workflows/greetings.yml@4b53189212d5810f710bed89711002626977215b # 0.33.0
uses: hoverkraft-tech/ci-github-common/.github/workflows/greetings.yml@03a5a2a3626b03434b19b79cdd2e141bea410bae # 0.34.1
permissions:
contents: read
issues: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/__main-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
release:
needs: ci
if: github.event_name != 'schedule'
uses: hoverkraft-tech/ci-github-publish/.github/workflows/release-actions.yml@5ff7d4c3910971ed53834becd5967271b4e228cf # 0.21.1
uses: hoverkraft-tech/ci-github-publish/.github/workflows/release-actions.yml@b56be562f38e0e3e712f09691a8fe930aae9db1b # 0.22.0
permissions:
contents: read
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/__need-fix-to-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ permissions: {}

jobs:
main:
uses: hoverkraft-tech/ci-github-common/.github/workflows/need-fix-to-issue.yml@4b53189212d5810f710bed89711002626977215b # 0.33.0
uses: hoverkraft-tech/ci-github-common/.github/workflows/need-fix-to-issue.yml@03a5a2a3626b03434b19b79cdd2e141bea410bae # 0.34.1
permissions:
contents: read
issues: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/__semantic-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ permissions: {}

jobs:
main:
uses: hoverkraft-tech/ci-github-common/.github/workflows/semantic-pull-request.yml@4b53189212d5810f710bed89711002626977215b # 0.33.0
uses: hoverkraft-tech/ci-github-common/.github/workflows/semantic-pull-request.yml@03a5a2a3626b03434b19b79cdd2e141bea410bae # 0.34.1
permissions:
contents: write
pull-requests: write
2 changes: 1 addition & 1 deletion .github/workflows/__shared-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ permissions: {}

jobs:
linter:
uses: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml@4b53189212d5810f710bed89711002626977215b # 0.33.0
uses: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml@03a5a2a3626b03434b19b79cdd2e141bea410bae # 0.34.1
permissions:
contents: read
statuses: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/__stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ permissions: {}

jobs:
main:
uses: hoverkraft-tech/ci-github-common/.github/workflows/stale.yml@4b53189212d5810f710bed89711002626977215b # 0.33.0
uses: hoverkraft-tech/ci-github-common/.github/workflows/stale.yml@03a5a2a3626b03434b19b79cdd2e141bea410bae # 0.34.1
permissions:
issues: write
pull-requests: write
2 changes: 1 addition & 1 deletion .github/workflows/__test-action-dependencies-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
unknown
- name: Assert - Check "dependencies-cache" configured cache
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
with:
script: |
const assert = require("assert");
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
unknown
- name: Assert - Check "has-installed-dependencies" outputs
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
env:
INSTALLED_DEPENDENCIES: ${{ steps.act-has-installed-dependencies.outputs.installed-dependencies }}
with:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
packages: write
issues: read
pull-requests: read
uses: hoverkraft-tech/ci-github-container/.github/workflows/docker-build-images.yml@df8b445f6cc9661dcb282d897d7146a82e5f2960 # 0.31.0
uses: hoverkraft-tech/ci-github-container/.github/workflows/docker-build-images.yml@e4bf7a12228a2a4b5993d2d36b99b4dd0ec80bf5 # 0.32.1
with:
sign: false
images: |
Expand Down
34 changes: 17 additions & 17 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ jobs:
path-mapping: ${{ steps.parse.outputs.path-mapping }}
steps:
- id: parse
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
env:
CONTAINER_INPUT: ${{ inputs.container }}
CONTAINER_PASSWORD: ${{ secrets.container-password }}
Expand Down Expand Up @@ -293,7 +293,7 @@ jobs:
security-events: write
runs-on: *ci-runner
steps:
- uses: hoverkraft-tech/ci-github-common/actions/checkout@4b53189212d5810f710bed89711002626977215b # 0.33.0
- uses: hoverkraft-tech/ci-github-common/actions/checkout@03a5a2a3626b03434b19b79cdd2e141bea410bae # 0.34.1
- uses: github/codeql-action/init@c10b8064de6f491fea524254123dbe5e09572f13 # v4.35.1
with:
languages: ${{ inputs.code-ql }}
Expand All @@ -306,7 +306,7 @@ jobs:
contents: read
runs-on: *ci-runner
steps:
- uses: hoverkraft-tech/ci-github-common/actions/checkout@4b53189212d5810f710bed89711002626977215b # 0.33.0
- uses: hoverkraft-tech/ci-github-common/actions/checkout@03a5a2a3626b03434b19b79cdd2e141bea410bae # 0.34.1
- uses: actions/dependency-review-action@2031cfc080254a8a887f58cffee85186f0e49e48 # v4.9.0

setup:
Expand Down Expand Up @@ -334,17 +334,17 @@ jobs:
steps:
- name: Checkout repository
if: inputs.container == ''
uses: hoverkraft-tech/ci-github-common/actions/checkout@4b53189212d5810f710bed89711002626977215b # 0.33.0
uses: hoverkraft-tech/ci-github-common/actions/checkout@03a5a2a3626b03434b19b79cdd2e141bea410bae # 0.34.1

- id: working-directory
uses: hoverkraft-tech/ci-github-common/actions/working-directory@4b53189212d5810f710bed89711002626977215b # 0.33.0
uses: hoverkraft-tech/ci-github-common/actions/working-directory@03a5a2a3626b03434b19b79cdd2e141bea410bae # 0.34.1
with:
working-directory: ${{ inputs.working-directory }}
enforce-path-in-workspace: ${{ inputs.container && 'false' || 'true' }}

- id: build-variables
if: inputs.build != ''
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
env:
WORKING_DIRECTORY: ${{ steps.working-directory.outputs.absolute-path }}
BUILD_INPUT: ${{ inputs.build }}
Expand Down Expand Up @@ -444,16 +444,16 @@ jobs:
packages: read
id-token: write # Needed for getting local workflow actions
steps:
- uses: hoverkraft-tech/ci-github-common/actions/checkout@4b53189212d5810f710bed89711002626977215b # 0.33.0
- uses: hoverkraft-tech/ci-github-common/actions/checkout@03a5a2a3626b03434b19b79cdd2e141bea410bae # 0.34.1
if: inputs.container == ''

- id: local-workflow-actions
uses: hoverkraft-tech/ci-github-common/actions/local-workflow-actions@4b53189212d5810f710bed89711002626977215b # 0.33.0
uses: hoverkraft-tech/ci-github-common/actions/local-workflow-actions@03a5a2a3626b03434b19b79cdd2e141bea410bae # 0.34.1
with:
actions-path: actions

- id: preparel-lint-options
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
env:
LINT_INPUT: ${{ inputs.lint }}
with:
Expand Down Expand Up @@ -484,7 +484,7 @@ jobs:
path-mapping: ${{ needs.prepare.outputs.path-mapping || '' }}

# jscpd:ignore-start
- uses: hoverkraft-tech/ci-github-common/actions/local-workflow-actions@4b53189212d5810f710bed89711002626977215b # 0.33.0
- uses: hoverkraft-tech/ci-github-common/actions/local-workflow-actions@03a5a2a3626b03434b19b79cdd2e141bea410bae # 0.34.1
if: always() && steps.local-workflow-actions.outputs.repository
with:
actions-path: actions
Expand All @@ -507,11 +507,11 @@ jobs:
outputs:
artifact-id: ${{ steps.build.outputs.artifact-id }}
steps:
- uses: hoverkraft-tech/ci-github-common/actions/checkout@4b53189212d5810f710bed89711002626977215b # 0.33.0
- uses: hoverkraft-tech/ci-github-common/actions/checkout@03a5a2a3626b03434b19b79cdd2e141bea410bae # 0.34.1
if: needs.setup.outputs.build-commands && inputs.container == ''

- id: local-workflow-actions
uses: hoverkraft-tech/ci-github-common/actions/local-workflow-actions@4b53189212d5810f710bed89711002626977215b # 0.33.0
uses: hoverkraft-tech/ci-github-common/actions/local-workflow-actions@03a5a2a3626b03434b19b79cdd2e141bea410bae # 0.34.1
with:
actions-path: actions

Expand All @@ -527,7 +527,7 @@ jobs:
build-artifact: ${{ needs.setup.outputs.build-artifact }}

# jscpd:ignore-start
- uses: hoverkraft-tech/ci-github-common/actions/local-workflow-actions@4b53189212d5810f710bed89711002626977215b # 0.33.0
- uses: hoverkraft-tech/ci-github-common/actions/local-workflow-actions@03a5a2a3626b03434b19b79cdd2e141bea410bae # 0.34.1
if: always() && steps.local-workflow-actions.outputs.repository
with:
actions-path: actions
Expand All @@ -550,7 +550,7 @@ jobs:
packages: read
id-token: write # Needed for getting local workflow actions
steps:
- uses: hoverkraft-tech/ci-github-common/actions/checkout@4b53189212d5810f710bed89711002626977215b # 0.33.0
- uses: hoverkraft-tech/ci-github-common/actions/checkout@03a5a2a3626b03434b19b79cdd2e141bea410bae # 0.34.1
if: inputs.container == ''

- if: needs.build.outputs.artifact-id && inputs.container == ''
Expand All @@ -560,12 +560,12 @@ jobs:
path: "/"

- id: local-workflow-actions
uses: hoverkraft-tech/ci-github-common/actions/local-workflow-actions@4b53189212d5810f710bed89711002626977215b # 0.33.0
uses: hoverkraft-tech/ci-github-common/actions/local-workflow-actions@03a5a2a3626b03434b19b79cdd2e141bea410bae # 0.34.1
with:
actions-path: actions

- id: prepare-test-options
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
env:
TEST_INPUT: ${{ inputs.test }}
with:
Expand Down Expand Up @@ -602,7 +602,7 @@ jobs:
github-token: ${{ secrets.github-token || github.token }}

# jscpd:ignore-start
- uses: hoverkraft-tech/ci-github-common/actions/local-workflow-actions@4b53189212d5810f710bed89711002626977215b # 0.33.0
- uses: hoverkraft-tech/ci-github-common/actions/local-workflow-actions@03a5a2a3626b03434b19b79cdd2e141bea410bae # 0.34.1
if: always() && steps.local-workflow-actions.outputs.repository
with:
actions-path: actions
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/node_modules
/tests/*/node_modules
/tests/*/coverage
/tests/yarn/package-lock.json
/dist
55 changes: 55 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,61 @@ lint-fix: ## Execute linting and fix
-e FIX_MARKDOWN_PRETTIER=true \
-e FIX_NATURAL_LANGUAGE=true)

deps-audit-fix: ## Execute dependency audit fix
@set -u; \
overall_status=0; \
packages="$$(find tests -type f -name package.json -not -path '*/node_modules/*' -print | sort)"; \
echo "Running dependency audit/fix for package.json files under tests/ ..."; \
for pkg in $$packages; do \
pkg_dir="$$(dirname "$$pkg")"; \
pm_field="$$(sed -n 's/.*"packageManager"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p' "$$pkg" | head -n 1)"; \
pm=""; \
case "$$pm_field" in \
pnpm@*) pm="pnpm" ;; \
yarn@*) pm="yarn" ;; \
npm@*) pm="npm" ;; \
*) \
if [ -f "$$pkg_dir/pnpm-lock.yaml" ]; then \
pm="pnpm"; \
elif [ -f "$$pkg_dir/yarn.lock" ]; then \
pm="yarn"; \
else \
pm="npm"; \
fi; \
;; \
esac; \
echo "---"; \
echo "Detected $$pm in $$pkg_dir"; \
case "$$pm" in \
npm) \
npm install --prefix "$$pkg_dir"; \
echo "npm audit fix in $$pkg_dir"; \
if ! npm --prefix "$$pkg_dir" audit fix; then \
overall_status=1; \
fi; \
;; \
pnpm) \
corepack pnpm install --dir "$$pkg_dir"; \
echo "pnpm audit --fix in $$pkg_dir"; \
if ! corepack pnpm audit --dir "$$pkg_dir" --fix; then \
overall_status=1; \
fi; \
;; \
yarn) \
corepack yarn --cwd "$$pkg_dir" install; \
echo "yarn audit in $$pkg_dir"; \
if ! corepack yarn --cwd "$$pkg_dir" audit; then \
overall_status=1; \
fi; \
;; \
esac; \
done; \
exit $$overall_status

ci: ## Execute CI tasks
$(MAKE) deps-audit-fix || true
$(MAKE) lint-fix

define run_linter
DEFAULT_WORKSPACE="$(CURDIR)"; \
LINTER_IMAGE="linter:latest"; \
Expand Down
8 changes: 4 additions & 4 deletions actions/build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ runs:
run: mkdir -p ./self-build-action/ && cp -r $GITHUB_ACTION_PATH/../* ./self-build-action/

- id: working-directory
uses: hoverkraft-tech/ci-github-common/actions/working-directory@4b53189212d5810f710bed89711002626977215b # 0.33.0
uses: hoverkraft-tech/ci-github-common/actions/working-directory@03a5a2a3626b03434b19b79cdd2e141bea410bae # 0.34.1
with:
working-directory: ${{ inputs.working-directory }}
enforce-path-in-workspace: ${{ inputs.container && 'false' || 'true' }}
Expand All @@ -94,7 +94,7 @@ runs:
with:
working-directory: ${{ steps.working-directory.outputs.absolute-path }}

- uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
env:
BUILD_ENV: ${{ inputs.build-env }}
BUILD_SECRETS: ${{ inputs.build-secrets }}
Expand Down Expand Up @@ -124,7 +124,7 @@ runs:
core.exportVariable(key.trim(), value.trim());
}

- uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
env:
BUILD_COMMANDS: ${{ inputs.build-commands }}
RUN_SCRIPT_COMMAND: ${{ inputs.container == 'true' && steps.get-package-manager.outputs.run-script-command || steps.setup-node.outputs.run-script-command }}
Expand Down Expand Up @@ -163,7 +163,7 @@ runs:

- id: build-artifact-id
if: inputs.build-artifact != ''
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: ${{ fromJSON(inputs.build-artifact).name }}
path: ${{ fromJSON(inputs.build-artifact).paths }}
Expand Down
6 changes: 3 additions & 3 deletions actions/codecov/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ runs:
using: "composite"
steps:
- id: working-directory
uses: hoverkraft-tech/ci-github-common/actions/working-directory@4b53189212d5810f710bed89711002626977215b # 0.33.0
uses: hoverkraft-tech/ci-github-common/actions/working-directory@03a5a2a3626b03434b19b79cdd2e141bea410bae # 0.34.1
with:
working-directory: ${{ inputs.working-directory }}
enforce-path-in-workspace: "false"

# Check and install dependencies for codecov
- name: Check Codecov dependencies
id: check-codecov-deps
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
with:
script: |
// Check which dependencies are missing
Expand All @@ -59,7 +59,7 @@ runs:

- name: Fix unexpanded environment variables
if: steps.check-codecov-deps.outputs.missing-deps
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
with:
script: |
const templatePattern = /\$\{([^}:]+)(?::-([^}]*))?\}/g;
Expand Down
4 changes: 2 additions & 2 deletions actions/dependencies-cache/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ runs:
run: mkdir -p ./self-dependencies-cache-action/ && cp -r $GITHUB_ACTION_PATH/../* ./self-dependencies-cache-action/

- id: working-directory
uses: hoverkraft-tech/ci-github-common/actions/working-directory@4b53189212d5810f710bed89711002626977215b # 0.33.0
uses: hoverkraft-tech/ci-github-common/actions/working-directory@03a5a2a3626b03434b19b79cdd2e141bea410bae # 0.34.1
with:
working-directory: ${{ inputs.working-directory }}
enforce-path-in-workspace: "false"
Expand Down Expand Up @@ -125,7 +125,7 @@ runs:
- name: ♻️ Get Jest cache dir
id: jest-cache-dir-path
if: fromJson(steps.has-installed-dependencies.outputs.installed-dependencies).jest == true
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
env:
WORKING_DIRECTORY: ${{ steps.working-directory.outputs.absolute-path }}
PACKAGE_MANAGER: ${{ steps.get-package-manager.outputs.package-manager }}
Expand Down
4 changes: 2 additions & 2 deletions actions/get-package-manager/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ runs:
using: "composite"
steps:
- id: working-directory
uses: hoverkraft-tech/ci-github-common/actions/working-directory@4b53189212d5810f710bed89711002626977215b # 0.33.0
uses: hoverkraft-tech/ci-github-common/actions/working-directory@03a5a2a3626b03434b19b79cdd2e141bea410bae # 0.34.1
with:
working-directory: ${{ inputs.working-directory }}
enforce-path-in-workspace: "false"

- id: get-package-manager
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
env:
WORKING_DIRECTORY: ${{ steps.working-directory.outputs.absolute-path }}
with:
Expand Down
4 changes: 2 additions & 2 deletions actions/has-installed-dependencies/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ runs:
run: mkdir -p ./self-actions/ && cp -r $GITHUB_ACTION_PATH/../* ./self-actions/

- id: working-directory
uses: hoverkraft-tech/ci-github-common/actions/working-directory@4b53189212d5810f710bed89711002626977215b # 0.33.0
uses: hoverkraft-tech/ci-github-common/actions/working-directory@03a5a2a3626b03434b19b79cdd2e141bea410bae # 0.34.1
with:
working-directory: ${{ inputs.working-directory }}
enforce-path-in-workspace: "false"
Expand All @@ -45,7 +45,7 @@ runs:
run: |
rm -fr ./self-actions
- id: has-dependencies
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
env:
WORKING_DIRECTORY: ${{ steps.working-directory.outputs.absolute-path }}
DEPENDENCIES: ${{ inputs.dependencies }}
Expand Down
Loading
Loading