mirror of
https://github.com/renovatebot/github-action.git
synced 2026-12-06 03:42:57 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3ac9d13fb2 |
No files matched your search
@@ -0,0 +1,33 @@
|
||||
module.exports = {
|
||||
extends: [
|
||||
'eslint:recommended',
|
||||
'plugin:@typescript-eslint/eslint-recommended',
|
||||
'plugin:@typescript-eslint/recommended',
|
||||
'prettier/@typescript-eslint',
|
||||
'plugin:prettier/recommended',
|
||||
],
|
||||
parser: '@typescript-eslint/parser',
|
||||
plugins: ['@typescript-eslint', 'prettier', 'json'],
|
||||
parserOptions: {
|
||||
sourceType: 'module',
|
||||
},
|
||||
env: {
|
||||
es2020: true,
|
||||
node: true,
|
||||
},
|
||||
rules: {
|
||||
'prettier/prettier': 'error',
|
||||
'sort-imports': 'error',
|
||||
},
|
||||
ignorePatterns: [
|
||||
'.git/',
|
||||
'.vscode',
|
||||
'build/',
|
||||
'dist/',
|
||||
'coverage/',
|
||||
'LICENSE.md',
|
||||
'modules/',
|
||||
'node_modules/',
|
||||
'!.*',
|
||||
],
|
||||
};
|
||||
@@ -1,60 +0,0 @@
|
||||
name: 'Setup Node.js'
|
||||
description: 'Setup Node and install dependencies using cache'
|
||||
inputs:
|
||||
save-cache:
|
||||
description: 'Save cache when needed'
|
||||
required: false
|
||||
default: 'false'
|
||||
|
||||
runs:
|
||||
using: 'composite'
|
||||
|
||||
steps:
|
||||
- name: ⚙️ Calculate `CACHE_KEY`
|
||||
shell: bash
|
||||
run: |
|
||||
echo 'CACHE_KEY=node_modules-${{
|
||||
hashFiles('.node-version', 'pnpm-lock.yaml')
|
||||
}}' >> "$GITHUB_ENV"
|
||||
|
||||
- name: ♻️ Restore `node_modules`
|
||||
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
||||
id: node-modules-restore
|
||||
with:
|
||||
path: node_modules
|
||||
key: ${{ env.CACHE_KEY }}
|
||||
enableCrossOsArchive: true
|
||||
|
||||
- name: Calculate `CACHE_HIT`
|
||||
shell: bash
|
||||
run: |
|
||||
echo 'CACHE_HIT=${{
|
||||
(steps.node-modules-restore.outputs.cache-hit == 'true') && 'true' || ''
|
||||
}}' >> "$GITHUB_ENV"
|
||||
|
||||
- name: ⚙️ Setup pnpm
|
||||
uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6.1.1
|
||||
with:
|
||||
standalone: true
|
||||
|
||||
- name: ⚙️ Setup Node.js ${{ inputs.node-version }}
|
||||
uses: actions/setup-node@8fccf151e3ba8038c300f83b40c8fd1e94f9c5ce # v7.2.0
|
||||
with:
|
||||
node-version-file: .node-version
|
||||
cache: ${{ env.CACHE_HIT != 'true' && 'pnpm' || '' }}
|
||||
|
||||
- name: 📥 Install dependencies
|
||||
if: env.CACHE_HIT != 'true'
|
||||
shell: bash
|
||||
run: pnpm install --frozen-lockfile
|
||||
env:
|
||||
# Other environment variables
|
||||
HUSKY: '0' # By default do not run HUSKY install
|
||||
|
||||
- name: ♻️ Write `node_modules` cache
|
||||
if: inputs.save-cache == 'true' && env.CACHE_HIT != 'true'
|
||||
uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
||||
with:
|
||||
path: node_modules
|
||||
key: ${{ env.CACHE_KEY }}
|
||||
enableCrossOsArchive: true
|
||||
+30
-59
@@ -1,70 +1,41 @@
|
||||
{
|
||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||
"extends": ["github>renovatebot/.github", ":pinDependencies"],
|
||||
"extends": [
|
||||
"config:base",
|
||||
":rebaseStalePrs",
|
||||
":pinDependencies",
|
||||
":masterIssue"
|
||||
],
|
||||
"prCreation": "not-pending",
|
||||
"lockFileMaintenance": {
|
||||
"enabled": true,
|
||||
"masterIssueApproval": true
|
||||
},
|
||||
"major": {
|
||||
"stabilityDays": 3,
|
||||
"masterIssueApproval": true
|
||||
},
|
||||
"packageRules": [
|
||||
{
|
||||
"description": "Use build semantic type for some deps",
|
||||
"matchPackageNames": ["@vercel/ncc", "typescript"],
|
||||
"semanticCommitType": "build"
|
||||
"description": "Automerge devDependencies updates",
|
||||
"depTypeList": ["devDependencies"],
|
||||
"updateTypes": ["pin", "digest", "patch", "minor"],
|
||||
"automerge": true
|
||||
},
|
||||
{
|
||||
"description": "Use `build` semantic commit scope for lockfile maintenance",
|
||||
"matchUpdateTypes": ["lockFileMaintenance"],
|
||||
"semanticCommitType": "build"
|
||||
},
|
||||
{
|
||||
"description": "Use ci semantic type for some deps",
|
||||
"matchFileNames": [".github/workflows/**"],
|
||||
"semanticCommitType": "ci"
|
||||
},
|
||||
{
|
||||
"description": "Don't require approval for renovate",
|
||||
"matchPackageNames": ["ghcr.io/renovatebot/renovate", "renovatebot/github-action"],
|
||||
"dependencyDashboardApproval": false
|
||||
},
|
||||
{
|
||||
"description": "Don't pin renovate updates",
|
||||
"matchPackageNames": ["ghcr.io/renovatebot/renovate"],
|
||||
"pinDigests": false
|
||||
},
|
||||
{
|
||||
"description": "Use feat! semantic type for renovate major",
|
||||
"matchPackageNames": ["ghcr.io/renovatebot/renovate"],
|
||||
"matchUpdateTypes": ["major"],
|
||||
"commitMessagePrefix": "feat(deps)!:",
|
||||
"additionalBranchPrefix": "renovate-major"
|
||||
"description": "Automerge renovate minor and patch updates",
|
||||
"packageNames": ["renovate/renovate"],
|
||||
"updateTypes": ["minor", "patch"],
|
||||
"semanticCommitType": "fix",
|
||||
"automerge": true
|
||||
}
|
||||
],
|
||||
"customManagers": [
|
||||
"regexManagers": [
|
||||
{
|
||||
"customType": "regex",
|
||||
"managerFilePatterns": ["README.md"],
|
||||
"matchStrings": ["uses: renovatebot/github-action@(?<currentValue>[^\\s]+)"],
|
||||
"depNameTemplate": "renovatebot/github-action",
|
||||
"datasourceTemplate": "github-releases"
|
||||
},
|
||||
{
|
||||
"customType": "regex",
|
||||
"managerFilePatterns": ["README.md"],
|
||||
"matchStrings": ["renovate-version: (?<currentValue>[^\\s]+)"],
|
||||
"depNameTemplate": "ghcr.io/renovatebot/renovate",
|
||||
"datasourceTemplate": "docker"
|
||||
},
|
||||
{
|
||||
"description": "Update renovate version in action.yml",
|
||||
"customType": "regex",
|
||||
"managerFilePatterns": ["action.yml"],
|
||||
"matchStrings": ["default: '(?<currentValue>[^\\s]+)' # renovate"],
|
||||
"depNameTemplate": "ghcr.io/renovatebot/renovate",
|
||||
"datasourceTemplate": "docker"
|
||||
},
|
||||
{
|
||||
"description": "Update renovate version in src/docker.ts",
|
||||
"customType": "regex",
|
||||
"managerFilePatterns": ["src/docker.ts"],
|
||||
"matchStrings": ["version = '(?<currentValue>[^\\s]+)'; // renovate"],
|
||||
"depNameTemplate": "ghcr.io/renovatebot/renovate",
|
||||
"datasourceTemplate": "docker"
|
||||
"fileMatch": ["^src/docker\\.ts$"],
|
||||
"matchStrings": [
|
||||
"// renovate: datasource=(?<datasource>[a-z-]+?) depName=(?<depName>.+?)(?: versioning=(?<versioning>[a-z-]+?))?\\s+readonly\\s+tag\\s+=\\s+'(?<currentValue>.+?)';"
|
||||
],
|
||||
"versioningTemplate": "{{#if versioning}}{{versioning}}{{else}}semver{{/if}}"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
# This file is machine-generated by `gh actions-lock`.
|
||||
# Do not edit by hand; run `gh actions-lock` to update.
|
||||
# Docs: https://gh.io/actions-lockfile
|
||||
version: 'v0.0.3'
|
||||
workflows:
|
||||
'.github/workflows/build.yml':
|
||||
- 'actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9'
|
||||
- 'actions/checkout@v7.0.1'
|
||||
- 'actions/setup-node@8fccf151e3ba8038c300f83b40c8fd1e94f9c5ce'
|
||||
- 'pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115'
|
||||
- 'wagoid/commitlint-github-action@v6.2.1'
|
||||
- 'zizmorcore/zizmor-action@v0.9.2'
|
||||
dependencies:
|
||||
'actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9':
|
||||
ref: 'v6.1.0'
|
||||
commit: 'sha1-55cc8345863c7cc4c66a329aec7e433d2d1c52a9'
|
||||
owner_id: 44036562
|
||||
repo_id: 215566462
|
||||
'actions/checkout@v7.0.1':
|
||||
ref: 'v7.0.1'
|
||||
commit: 'sha1-3d3c42e5aac5ba805825da76410c181273ba90b1'
|
||||
owner_id: 44036562
|
||||
repo_id: 197814629
|
||||
'actions/setup-node@8fccf151e3ba8038c300f83b40c8fd1e94f9c5ce':
|
||||
ref: 'v7.2.0'
|
||||
commit: 'sha1-8fccf151e3ba8038c300f83b40c8fd1e94f9c5ce'
|
||||
owner_id: 44036562
|
||||
repo_id: 189476904
|
||||
'github/codeql-action@33d7b85da1a04171e211befe2c739303b9a4c066':
|
||||
ref: 'v4.39.3'
|
||||
commit: 'sha1-33d7b85da1a04171e211befe2c739303b9a4c066'
|
||||
owner_id: 9919
|
||||
repo_id: 259445878
|
||||
'pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115':
|
||||
ref: 'v6.1.1'
|
||||
commit: 'sha1-73e46992e05b19abd31f2f3c20e0e7370d762115'
|
||||
owner_id: 21320719
|
||||
repo_id: 262289747
|
||||
'wagoid/commitlint-github-action@v6.2.1':
|
||||
ref: 'v6.2.1'
|
||||
commit: 'sha1-b948419dd99f3fd78a6548d48f94e3df7f6bf3ed'
|
||||
owner_id: 7467450
|
||||
repo_id: 212203144
|
||||
'zizmorcore/zizmor-action@v0.9.2':
|
||||
ref: 'v0.9.2'
|
||||
commit: 'sha1-1b4550e929643b8b26a62303c6bd64814271a4f1'
|
||||
owner_id: 210636713
|
||||
repo_id: 985558803
|
||||
uses:
|
||||
- 'github/codeql-action@33d7b85da1a04171e211befe2c739303b9a4c066'
|
||||
+44
-190
@@ -2,217 +2,71 @@ name: Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- 'renovate/**'
|
||||
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
RENOVATE_VERSION: 45.16.0 # renovate: datasource=docker depName=ghcr.io/renovatebot/renovate
|
||||
|
||||
jobs:
|
||||
prepare:
|
||||
cleanup:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
timeout-minutes: 5
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v7.0.1
|
||||
- name: github-cleanup
|
||||
uses: renovatebot/internal-tools@v0
|
||||
continue-on-error: true
|
||||
with:
|
||||
persist-credentials: false
|
||||
show-progress: false
|
||||
|
||||
- name: 📥 Setup Node.js
|
||||
uses: $/.github/actions/setup-node
|
||||
with:
|
||||
save-cache: true
|
||||
command: github-cleanup
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
commitlint:
|
||||
needs: [cleanup]
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event_name != 'pull_request' || github.repository_owner != github.event.pull_request.head.repo.owner.login }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v7.0.1
|
||||
uses: actions/checkout@v2.1.0
|
||||
with:
|
||||
fetch-depth: 0
|
||||
persist-credentials: false
|
||||
show-progress: false
|
||||
filter: blob:none # we don't need all blobs, only the full tree
|
||||
|
||||
- name: Lint commit messages
|
||||
uses: wagoid/commitlint-github-action@v6.2.1
|
||||
continue-on-error: true
|
||||
|
||||
lint:
|
||||
needs:
|
||||
- prepare
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event_name != 'pull_request' || github.repository_owner != github.event.pull_request.head.repo.owner.login }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
show-progress: false
|
||||
|
||||
- name: 📥 Setup Node.js
|
||||
uses: $/.github/actions/setup-node
|
||||
|
||||
- name: Lint
|
||||
run: pnpm lint
|
||||
|
||||
lint-actions:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
security-events: write
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
show-progress: false
|
||||
|
||||
- name: Run zizmor
|
||||
uses: zizmorcore/zizmor-action@v0.9.2
|
||||
with:
|
||||
version: 1.33.1
|
||||
|
||||
e2e:
|
||||
needs:
|
||||
- prepare
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event_name != 'pull_request' || github.repository_owner != github.event.pull_request.head.repo.owner.login }}
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
configurationFile:
|
||||
- example/renovate-config.js
|
||||
- example/renovate-config.json
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
show-progress: false
|
||||
|
||||
- name: 📥 Setup Node.js
|
||||
uses: $/.github/actions/setup-node
|
||||
|
||||
- name: Build
|
||||
run: pnpm build
|
||||
|
||||
- name: Configure renovate token
|
||||
run: |
|
||||
if [[ "${RENOVATE_TOKEN}" != "" ]]; then
|
||||
echo "RENOVATE_TOKEN=${RENOVATE_TOKEN}" >> $GITHUB_ENV
|
||||
else
|
||||
echo "RENOVATE_TOKEN=${GITHUB_TOKEN}" >> $GITHUB_ENV
|
||||
fi
|
||||
uses: wagoid/commitlint-github-action@v1.6.0
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
RENOVATE_TOKEN: ${{ secrets.RENOVATE_TOKEN }}
|
||||
|
||||
- name: Renovate test
|
||||
uses: ./ # zizmor: ignore[self-repository] tests the action built in the workspace
|
||||
env:
|
||||
LOG_LEVEL: debug
|
||||
with:
|
||||
configurationFile: ${{ matrix.configurationFile }}
|
||||
|
||||
- name: Renovate test with entrypoint
|
||||
uses: ./ # zizmor: ignore[self-repository] tests the action built in the workspace
|
||||
env:
|
||||
LOG_LEVEL: debug
|
||||
with:
|
||||
configurationFile: ${{ matrix.configurationFile }}
|
||||
renovate-version: ${{ env.RENOVATE_VERSION }}
|
||||
docker-cmd-file: example/entrypoint.sh
|
||||
docker-user: root
|
||||
|
||||
- name: Renovate test with image and digest
|
||||
uses: ./ # zizmor: ignore[self-repository] tests the action built in the workspace
|
||||
env:
|
||||
LOG_LEVEL: debug
|
||||
with:
|
||||
configurationFile: ${{ matrix.configurationFile }}
|
||||
renovate-image: ghcr.io/renovatebot/renovate:44.115.4@sha256:03e987bec9fbda0cf39ef63f2d293e821d96525119e1ab3d0ff87d5b3ef3edd9
|
||||
|
||||
renovate-config-validator:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
container:
|
||||
image: ghcr.io/renovatebot/renovate:45.16.0@sha256:125f2e3b20e406e7c3393b56b48f6883ed3d4dc8a1bec50c43326a21da932769
|
||||
# github hosted runners are running as `1001:127` (ubuntu:docker)
|
||||
options: -u 1001:0 --group-add 1000 --group-add 12021 --group-add 127
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
show-progress: false
|
||||
|
||||
- name: Validate Renovate configuration
|
||||
working-directory: example
|
||||
run: |
|
||||
renovate-config-validator renovate-config.js renovate-config.json
|
||||
|
||||
release:
|
||||
needs:
|
||||
- lint
|
||||
- commitlint
|
||||
- lint-actions
|
||||
- e2e
|
||||
- renovate-config-validator
|
||||
lint:
|
||||
needs: [cleanup]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Setup Git user
|
||||
shell: bash
|
||||
run: |
|
||||
git config --global core.autocrlf false
|
||||
git config --global core.symlinks true
|
||||
git config --global user.name "github-actions[bot]"
|
||||
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v7.0.1 # zizmor: ignore[artipacked] pushes the release branch
|
||||
uses: actions/checkout@v2.1.0
|
||||
- name: Setup node
|
||||
uses: actions/setup-node@v1.4.1
|
||||
with:
|
||||
fetch-depth: 0 # required for semantic release
|
||||
ref: 'release'
|
||||
show-progress: false
|
||||
filter: blob:none # we don't need all blobs, only the full tree
|
||||
node-version: '12.x'
|
||||
- name: Install project
|
||||
run: npm ci
|
||||
- name: Lint
|
||||
run: npm run lint
|
||||
|
||||
- name: fetch pr
|
||||
if: ${{github.event_name == 'pull_request'}}
|
||||
run: git fetch origin +$GH_SHA:$GH_REF
|
||||
env:
|
||||
GH_SHA: ${{ github.sha }}
|
||||
GH_REF: ${{ github.ref }}
|
||||
e2e:
|
||||
needs: [cleanup]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2.1.0
|
||||
- name: Install project
|
||||
run: npm ci
|
||||
- name: Build
|
||||
run: npm run build
|
||||
- name: Renovate test
|
||||
uses: ./
|
||||
with:
|
||||
configurationFile: example/renovate-config.js
|
||||
token: ${{ secrets.RENOVATE_TOKEN }}
|
||||
|
||||
- name: Merge main
|
||||
id: merge
|
||||
run: |
|
||||
git merge --no-ff -Xtheirs -m "skip: merge ($GH_SHA) [skip release]" $GH_SHA
|
||||
commit=$(git rev-parse HEAD)
|
||||
env:
|
||||
GH_SHA: ${{ github.sha }}
|
||||
|
||||
- name: 📥 Setup Node.js
|
||||
uses: $/.github/actions/setup-node
|
||||
|
||||
- name: Push release branch
|
||||
run: git push origin release:release
|
||||
if: ${{ github.ref_name == github.event.repository.default_branch }}
|
||||
|
||||
- name: Release
|
||||
run: |
|
||||
# override for semantic-release
|
||||
export GITHUB_REF=refs/heads/release GITHUB_SHA=${{ steps.merge.outputs.commit }}
|
||||
pnpm release
|
||||
if: ${{ github.ref_name == github.event.repository.default_branch }}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
build:
|
||||
needs: [lint, commitlint, e2e]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: echo 'Dummy'
|
||||
@@ -0,0 +1,65 @@
|
||||
name: Release
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
if: |
|
||||
startsWith(github.event.commits[0].message, 'fix(deps): update renovate/renovate docker tag ')
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2.1.0
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Fetch tags
|
||||
run: git fetch --tags
|
||||
- name: Setup Git user
|
||||
run: |
|
||||
git config --local user.name "github-actions[bot]"
|
||||
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
- name: Setup node
|
||||
uses: actions/setup-node@v1.4.1
|
||||
with:
|
||||
node-version: '12.x'
|
||||
- name: Install project
|
||||
run: npm ci
|
||||
- name: Release
|
||||
run: |
|
||||
SEMVER_REGEX="v(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)"
|
||||
if [[ ! "${{ github.event.commits[0].message }}" =~ ${SEMVER_REGEX} ]]; then
|
||||
echo Not a semver like version - aborting: ${1}
|
||||
exit 1
|
||||
fi
|
||||
NEXT_VERSION="${BASH_REMATCH[1]}.${BASH_REMATCH[2]}.${BASH_REMATCH[3]}"
|
||||
MAJOR_VERSION="${BASH_REMATCH[1]}"
|
||||
echo "::set-env name=NEXT_VERSION::${NEXT_VERSION}"
|
||||
echo "::set-env name=MAJOR_VERSION::${MAJOR_VERSION}"
|
||||
npm version ${NEXT_VERSION} -m "chore(release): ${NEXT_VERSION}"
|
||||
git tag "v${MAJOR_VERSION}"
|
||||
|
||||
- name: Publish release
|
||||
run: |
|
||||
git push origin "v${NEXT_VERSION}"
|
||||
git push -f origin "v${MAJOR_VERSION}"
|
||||
|
||||
# - name: Publish GitHub release
|
||||
# uses: actions/create-release@v1.0.1
|
||||
# env:
|
||||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
# with:
|
||||
# tag_name: v${{ env.NEXT_VERSION }}
|
||||
# release_name: v${{ env.NEXT_VERSION }}
|
||||
# body: |
|
||||
# See the the [changelog](
|
||||
# https://github.com/${{ github.repository }}/blob/master/CHANGELOG.md
|
||||
# ) for the changes included in this release.
|
||||
prevent_failed_status:
|
||||
name: Prevent failed status when skipped
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Prevent failed status when skipped
|
||||
run: |
|
||||
echo "Run this job to prevent the workflow status from showing as" \
|
||||
"failed when all other jobs are skipped."
|
||||
+1
-4
@@ -187,7 +187,7 @@ typings/
|
||||
# nuxt.js build output
|
||||
.nuxt
|
||||
|
||||
# react / gatsby
|
||||
# react / gatsby
|
||||
public/
|
||||
|
||||
# vuepress build output
|
||||
@@ -300,6 +300,3 @@ dkms.conf
|
||||
*.exe
|
||||
*.out
|
||||
*.app
|
||||
|
||||
|
||||
/.pnpm-store
|
||||
@@ -1,3 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
commitlint --edit "$1"
|
||||
@@ -1,3 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
lint-staged
|
||||
@@ -0,0 +1,6 @@
|
||||
module.exports = {
|
||||
hooks: {
|
||||
'pre-commit': 'lint-staged',
|
||||
'commit-msg': 'commitlint -E HUSKY_GIT_PARAMS',
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,6 @@
|
||||
module.exports = {
|
||||
'*.{ts,tsx,js,jsx,json}': ['npm run lint-es:file:fix'],
|
||||
'*.{vue,ts,css,less,scss,html,htm,md,markdown,yml,yaml}': [
|
||||
'npm run format:file',
|
||||
],
|
||||
};
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"*.{js,ts,cjs,mjs}": ["oxlint --fix", "oxfmt"],
|
||||
"!*.{js,ts,cjs,mjs}": "oxfmt --no-error-on-unmatched-pattern"
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
24.23.0
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"$schema": "./node_modules/oxfmt/configuration_schema.json",
|
||||
"singleQuote": true,
|
||||
"sortPackageJson": {},
|
||||
"ignorePatterns": ["LICENSE.md", "pnpm-lock.yaml"]
|
||||
}
|
||||
-102
@@ -1,102 +0,0 @@
|
||||
{
|
||||
"$schema": "./node_modules/oxlint/configuration_schema.json",
|
||||
"plugins": ["eslint", "typescript", "import", "vitest", "promise", "oxc"],
|
||||
"jsPlugins": ["@containerbase/oxlint-plugin"],
|
||||
"options": {
|
||||
"typeAware": true,
|
||||
"reportUnusedDisableDirectives": "error"
|
||||
},
|
||||
"categories": {
|
||||
"correctness": "error"
|
||||
},
|
||||
"env": {
|
||||
"builtin": true,
|
||||
"node": true
|
||||
},
|
||||
"ignorePatterns": ["dist/", "coverage/", ".claude/worktrees/", ".pnpm-store"],
|
||||
"rules": {
|
||||
"containerbase/enforce-ts-extension": "error",
|
||||
"containerbase/no-undeclared-dependencies": "error",
|
||||
"containerbase/organize-imports": "error",
|
||||
"containerbase/test-root-describe": "error",
|
||||
|
||||
"import/no-cycle": "error",
|
||||
"import/no-duplicates": "error",
|
||||
"import/export": "error",
|
||||
|
||||
"curly": ["error", "all"],
|
||||
"no-var": "error",
|
||||
"prefer-const": "error",
|
||||
"prefer-rest-params": "error",
|
||||
"prefer-spread": "error",
|
||||
"no-empty": "error",
|
||||
"no-prototype-builtins": "error",
|
||||
"no-useless-escape": "error",
|
||||
"no-fallthrough": "error",
|
||||
"no-unused-vars": ["error", { "varsIgnorePattern": "^_", "argsIgnorePattern": "^_" }],
|
||||
"no-unused-expressions": "error",
|
||||
"no-empty-function": "error",
|
||||
"no-array-constructor": "error",
|
||||
|
||||
"sort-imports": [
|
||||
"error",
|
||||
{
|
||||
"ignoreCase": false,
|
||||
"ignoreDeclarationSort": true,
|
||||
"ignoreMemberSort": false,
|
||||
"memberSyntaxSortOrder": ["none", "all", "multiple", "single"]
|
||||
}
|
||||
],
|
||||
|
||||
"typescript/unbound-method": ["error", { "ignoreStatic": true }],
|
||||
"typescript/restrict-plus-operands": "error",
|
||||
"typescript/restrict-template-expressions": "error",
|
||||
"typescript/no-empty-object-type": "error",
|
||||
"typescript/ban-ts-comment": "error",
|
||||
"typescript/no-explicit-any": "error",
|
||||
"typescript/no-namespace": "error",
|
||||
"typescript/no-non-null-assertion": "error",
|
||||
"typescript/no-require-imports": "error",
|
||||
"typescript/no-unsafe-argument": "error",
|
||||
"typescript/no-unsafe-assignment": "error",
|
||||
"typescript/no-unsafe-call": "error",
|
||||
"typescript/no-unsafe-member-access": "error",
|
||||
"typescript/no-unsafe-return": "error",
|
||||
"typescript/no-unsafe-function-type": "error",
|
||||
"typescript/no-wrapper-object-types": "error",
|
||||
"typescript/only-throw-error": "error",
|
||||
"typescript/prefer-promise-reject-errors": "error",
|
||||
"typescript/require-await": "error",
|
||||
"typescript/triple-slash-reference": "error",
|
||||
"typescript/no-unsafe-enum-comparison": "error",
|
||||
"typescript/no-unnecessary-type-assertion": "error",
|
||||
"typescript/no-redundant-type-constituents": "error",
|
||||
"typescript/no-duplicate-type-constituents": "error",
|
||||
"typescript/no-base-to-string": "error",
|
||||
"typescript/no-misused-promises": "error",
|
||||
"typescript/no-floating-promises": "error",
|
||||
"typescript/await-thenable": "error",
|
||||
"typescript/no-for-in-array": "error",
|
||||
"typescript/no-implied-eval": "error",
|
||||
"typescript/no-array-delete": "error",
|
||||
"typescript/no-this-alias": "error",
|
||||
|
||||
"promise/always-return": "error",
|
||||
"promise/catch-or-return": "error",
|
||||
"promise/no-return-wrap": "error",
|
||||
"promise/param-names": "error",
|
||||
"promise/valid-params": "error",
|
||||
|
||||
"vitest/require-mock-type-parameters": "off",
|
||||
"vitest/require-to-throw-message": "off"
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["tools/**", "commitlint.config.js"],
|
||||
"rules": {
|
||||
"containerbase/no-undeclared-dependencies": ["error", { "allowDevDependencies": true }],
|
||||
"typescript/no-explicit-any": "off"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
.git/
|
||||
.vscode
|
||||
build/
|
||||
dist/
|
||||
coverage/
|
||||
LICENSE.md
|
||||
modules/
|
||||
node_modules/
|
||||
@@ -0,0 +1,3 @@
|
||||
module.exports = {
|
||||
singleQuote: true,
|
||||
};
|
||||
@@ -1,96 +0,0 @@
|
||||
{
|
||||
"branches": ["release"],
|
||||
"plugins": [
|
||||
"@semantic-release/commit-analyzer",
|
||||
"@semantic-release/release-notes-generator",
|
||||
"@semantic-release/npm",
|
||||
[
|
||||
"@semantic-release/git",
|
||||
{
|
||||
"assets": ["dist", "package.json"],
|
||||
"message": "chore(release): ${nextRelease.version} [skip ci]"
|
||||
}
|
||||
],
|
||||
[
|
||||
"@semantic-release/github",
|
||||
{
|
||||
"releasedLabels": false,
|
||||
"successComment": false
|
||||
}
|
||||
]
|
||||
],
|
||||
"analyzeCommits": {
|
||||
"releaseRules": [
|
||||
{
|
||||
"type": "docs",
|
||||
"scope": "readme.md",
|
||||
"release": "patch"
|
||||
},
|
||||
{
|
||||
"type": "build",
|
||||
"release": "patch"
|
||||
},
|
||||
{
|
||||
"type": "skip",
|
||||
"release": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"preset": "conventionalcommits",
|
||||
"presetConfig": {
|
||||
"types": [
|
||||
{
|
||||
"type": "feat",
|
||||
"section": "Features"
|
||||
},
|
||||
{
|
||||
"type": "feature",
|
||||
"section": "Features"
|
||||
},
|
||||
{
|
||||
"type": "fix",
|
||||
"section": "Bug Fixes"
|
||||
},
|
||||
{
|
||||
"type": "perf",
|
||||
"section": "Performance Improvements"
|
||||
},
|
||||
{
|
||||
"type": "revert",
|
||||
"section": "Reverts"
|
||||
},
|
||||
{
|
||||
"type": "docs",
|
||||
"section": "Documentation"
|
||||
},
|
||||
{
|
||||
"type": "style",
|
||||
"section": "Styles"
|
||||
},
|
||||
{
|
||||
"type": "chore",
|
||||
"section": "Miscellaneous Chores"
|
||||
},
|
||||
{
|
||||
"type": "refactor",
|
||||
"section": "Code Refactoring"
|
||||
},
|
||||
{
|
||||
"type": "test",
|
||||
"section": "Tests"
|
||||
},
|
||||
{
|
||||
"type": "build",
|
||||
"section": "Build System"
|
||||
},
|
||||
{
|
||||
"type": "ci",
|
||||
"section": "Continuous Integration"
|
||||
},
|
||||
{
|
||||
"type": "skip",
|
||||
"hidden": true
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
module.exports = {
|
||||
scripts: {
|
||||
prerelease:
|
||||
'if [ "$(git branch --show-current)" != "master" ]; then exit 1; fi',
|
||||
},
|
||||
};
|
||||
+43
-1
@@ -1,3 +1,45 @@
|
||||
# Changelog
|
||||
|
||||
You can find the changelogs on the [GitHub releases page for `renovatebot/github-action`](https://github.com/renovatebot/github-action/releases/).
|
||||
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
||||
|
||||
### [1.0.5](https://github.com/vidavidorra/github-action-renovate/compare/v1.0.4...v1.0.5) (2020-03-30)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **deps:** update renovate/renovate docker tag to v19.189.0 ([#11](https://github.com/vidavidorra/github-action-renovate/issues/11)) ([df74dfa](https://github.com/vidavidorra/github-action-renovate/commit/df74dfa0053acfbf2db3f782f5c042065b9807f5))
|
||||
|
||||
### [1.0.4](https://github.com/vidavidorra/github-action-renovate/compare/v1.0.3...v1.0.4) (2020-03-28)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **deps:** update renovate/renovate docker tag to v19.184.2 ([#10](https://github.com/vidavidorra/github-action-renovate/issues/10)) ([32ae3cb](https://github.com/vidavidorra/github-action-renovate/commit/32ae3cb974963fdc7987adee6de3ad402ca2361b))
|
||||
|
||||
### [1.0.3](https://github.com/vidavidorra/github-action-renovate/compare/v1.0.2...v1.0.3) (2020-03-27)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **deps:** update renovate/renovate docker tag to v19.181.0 ([#8](https://github.com/vidavidorra/github-action-renovate/issues/8)) ([9b29fd3](https://github.com/vidavidorra/github-action-renovate/commit/9b29fd34fe1d09431e3b7967c5c4c71f4b8e67d6))
|
||||
- **deps:** update renovate/renovate docker tag to v19.184.0 ([#9](https://github.com/vidavidorra/github-action-renovate/issues/9)) ([de6975e](https://github.com/vidavidorra/github-action-renovate/commit/de6975e31a6c1c301f86ea5d04dd3e8579e5d815))
|
||||
|
||||
### [1.0.2](https://github.com/vidavidorra/github-action-renovate/compare/v1.0.1...v1.0.2) (2020-03-22)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **deps:** update renovate/renovate docker tag to v19.176.3 ([9957aeb](https://github.com/vidavidorra/github-action-renovate/commit/9957aeba72b45e1fcc9a87b8532a52ad2464a526))
|
||||
|
||||
### [1.0.1](https://github.com/vidavidorra/github-action-renovate/compare/v1.0.0...v1.0.1) (2020-03-20)
|
||||
|
||||
## 1.0.0 (2020-03-20)
|
||||
|
||||
### Features
|
||||
|
||||
- add self-hosted renovate sources ([5f5662b](https://github.com/vidavidorra/github-action-renovate/commit/5f5662bb8600d82e9e23ac911d56ec943ab3c0ff))
|
||||
- add token input and account for Renovate WORKDIR ([cd4dee3](https://github.com/vidavidorra/github-action-renovate/commit/cd4dee329720030349b278460f2f6ff8ddaca4c4))
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- add chmod+x for entrypoint ([f0979c4](https://github.com/vidavidorra/github-action-renovate/commit/f0979c49826eb1885a487e12c30cea1650e7266b))
|
||||
- correct COPY in dockerfile for relative path ([341841e](https://github.com/vidavidorra/github-action-renovate/commit/341841ebc60c5c2a221ed49db2f91326bcd0cdd8))
|
||||
- prefix configuration file with GitHub workspace dir ([26124b0](https://github.com/vidavidorra/github-action-renovate/commit/26124b07e464ef56a31f3e77425052bb67ac8a20))
|
||||
- the Dockerfile MUST have a lowercase F for GitHub Action to work ([3e4d5f0](https://github.com/vidavidorra/github-action-renovate/commit/3e4d5f0dd6da60c4277b72bb0a26dd4dd2707dd7))
|
||||
- typo in action 9DockerFile) ([5525465](https://github.com/vidavidorra/github-action-renovate/commit/5525465215bf73411f8a5b436105a1fc8175e031))
|
||||
@@ -2,302 +2,65 @@
|
||||
|
||||
GitHub Action to run Renovate self-hosted.
|
||||
|
||||
<!-- markdownlint-disable no-inline-html -->
|
||||
|
||||
<a name="toc"></a>
|
||||
|
||||
## Table of contents
|
||||
|
||||
- [Badges](#badges)
|
||||
- [Options](#options)
|
||||
- [`additional-env-list`](#additional-env-list)
|
||||
- [`configurationFile`](#configurationfile)
|
||||
- [`docker-cmd-file`](#docker-cmd-file)
|
||||
- [`docker-network`](#docker-network)
|
||||
- [`docker-socket-host-path`](#docker-socket-host-path)
|
||||
- [`docker-user`](#docker-user)
|
||||
- [`docker-volumes`](#docker-volumes)
|
||||
- [`env-regex`](#env-regex)
|
||||
- [`mount-docker-socket`](#mount-docker-socket)
|
||||
- [`token`](#token)
|
||||
- [`renovate-image`](#renovate-image)
|
||||
- [`renovate-version`](#renovate-version)
|
||||
- [`configurationFile`](#option-configurationFile)
|
||||
- [`token`](#option-token)
|
||||
- [Example](#example)
|
||||
- [Environment Variables](#environment-variables)
|
||||
- [Passing other environment variables](#passing-other-environment-variables)
|
||||
- [Persisting the Repository Cache](#persisting-the-repository-cache)
|
||||
- [Troubleshooting](#troubleshooting)
|
||||
- [Debug Logging](#debug-logging)
|
||||
- [Special token requirements when using the `github-actions` manager](#special-token-requirements-when-using-the-github-actions-manager)
|
||||
- [License](#license)
|
||||
|
||||
<a name="badges"></a>
|
||||
|
||||
## Badges
|
||||
|
||||
| Badge | Description | Service |
|
||||
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | -------------------- |
|
||||
| <a href="https://github.com/prettier/prettier#readme"><img alt="code style" src="https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square"></a> | Code style | Prettier |
|
||||
| <a href="https://conventionalcommits.org"><img alt="Conventional Commits: 1.0.0" src="https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg?style=flat-square"></a> | Commit style | Conventional Commits |
|
||||
| <a href="https://renovatebot.com"><img alt="Renovate enabled" src="https://img.shields.io/badge/renovate-enabled-brightgreen.svg?style=flat-square"></a> | Dependencies | Renovate |
|
||||
| <a href="https://github.com/renovatebot/github-action/actions"><img alt="GitHub workflow status" src="https://img.shields.io/github/actions/workflow/status/renovatebot/github-action/build.yml?style=flat-square"></a> | Build | GitHub Actions |
|
||||
| Badge | Description | Service |
|
||||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | -------------------- |
|
||||
| <a href="https://github.com/prettier/prettier#readme"><img alt="code style" src="https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square"></a> | Code style | Prettier |
|
||||
| <a href="https://conventionalcommits.org"><img alt="Conventional Commits: 1.0.0" src="https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg?style=flat-square"></a> | Commit style | Conventional Commits |
|
||||
| <a href="https://renovatebot.com"><img alt="Renovate enabled" src="https://img.shields.io/badge/renovate-enabled-brightgreen.svg?style=flat-square"></a> | Dependencies | Renovate |
|
||||
| <a href="https://github.com/renovatebot/github-action/actions"><img alt="GitHub workflow status" src="https://img.shields.io/github/workflow/status/renovatebot/github-action/Build?style=flat-square"></a> | Build | GitHub Actions |
|
||||
| <a href="https://github.com/renovatebot/github-action/actions"><img alt="GitHub workflow status" src="https://img.shields.io/github/workflow/status/renovatebot/github-action/Example?style=flat-square"></a> | Example | GitHub Actions |
|
||||
|
||||
<a name="options"></a>
|
||||
|
||||
## Options
|
||||
|
||||
Options can be passed using the inputs of this action or the corresponding environment variables.
|
||||
When both are passed, the input takes precedence over the environment variable.
|
||||
For the available environment variables, see the Renovate [Self-Hosted Configuration](https://docs.renovatebot.com/self-hosted-configuration/) docs.
|
||||
<a name="option-configurationFile"></a>
|
||||
|
||||
### `additional-env-list`
|
||||
## `configurationFile`
|
||||
|
||||
A newline-separated list of environment variable names to pass through to the Renovate container, in addition to those already matched by [`env-regex`](#env-regex).
|
||||
See [Passing other environment variables](#passing-other-environment-variables) section for more details.
|
||||
|
||||
### `configurationFile`
|
||||
|
||||
Configuration file to configure Renovate ("global" config) in JavaScript or JSON format.
|
||||
It is recommended to not name it one of the repository configuration filenames listed in the Renovate Docs for [Configuration Options](https://docs.renovatebot.com/configuration-options/).
|
||||
|
||||
Config examples can be found in the [example](./example) directory.
|
||||
|
||||
The configurations that can be done in this file consists of two parts, as listed below.
|
||||
Refer to the links to the [Renovate Docs](https://docs.renovatebot.com/) for all options.
|
||||
Configuration file to configure Renovate. The configurations that can be done in this file consists of two parts, as listed below. Refer to the links to the [Renovate Docs](https://docs.renovatebot.com/) for all options and see the [`example/config.js`](./example/config.js) for an example configuration.
|
||||
|
||||
1. [Self-Hosted Configuration Options](https://docs.renovatebot.com/self-hosted-configuration/)
|
||||
2. [Configuration Options](https://docs.renovatebot.com/configuration-options/)
|
||||
|
||||
The [`branchPrefix`](https://docs.renovatebot.com/configuration-options/#branchprefix) option is important to configure and should be configured to a value other than the default to prevent interference with e.g. the Renovate GitHub App.
|
||||
|
||||
If you want to use this with just the single configuration file, make sure to include the following two configuration lines.
|
||||
This disables the requirement of a configuration file for the repository and disables onboarding.
|
||||
If you want to use this with just the single configuration file, make sure to include the following two configuration lines. This disables the requirement of a configuration file for the repository and disables onboarding.
|
||||
|
||||
```js
|
||||
onboarding: false,
|
||||
requireConfig: 'optional',
|
||||
requireConfig: false,
|
||||
```
|
||||
|
||||
### `docker-cmd-file`
|
||||
<a name="option-token"></a>
|
||||
|
||||
Specify a command to run when the image start.
|
||||
By default the image run
|
||||
`renovate`.
|
||||
This option is useful to customize the image before running `renovate`.
|
||||
It must be an existing executable file on the local system.
|
||||
It will be mounted to the docker container.
|
||||
## `token`
|
||||
|
||||
For example you can create a simple script like this one (let's call it
|
||||
`renovate-entrypoint.sh`).
|
||||
[Generate a personal access token](https://github.com/settings/tokens), with the `repo:public_repo` scope for only public repositories or the `repo` scope for public and private repositories, and add it to _Secrets_ (repository settings) as `RENOVATE_TOKEN`. You can also create a token without a specific scope, which gives read-only access to public repositories, for testing. This token is only used by Renovate, see the [token configuration](https://docs.renovatebot.com/self-hosted-configuration/#token), and gives it access to the repositories. The name of the secret can be anything as long as it matches the argument given to the `token` option.
|
||||
|
||||
```sh
|
||||
#!/bin/bash
|
||||
Note that the [`GITHUB_TOKEN`](https://help.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token#permissions-for-the-github_token) secret can't be used for authenticating Renovate.
|
||||
|
||||
apt update
|
||||
|
||||
apt install -y build-essential libpq-dev
|
||||
|
||||
runuser -u ubuntu renovate
|
||||
```
|
||||
|
||||
Now use this action
|
||||
|
||||
```yml
|
||||
....
|
||||
jobs:
|
||||
renovate:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v7.0.1
|
||||
- name: Self-hosted Renovate
|
||||
uses: renovatebot/github-action@v48.0.1
|
||||
with:
|
||||
docker-cmd-file: .github/renovate-entrypoint.sh
|
||||
docker-user: root
|
||||
token: ${{ secrets.RENOVATE_TOKEN }}
|
||||
```
|
||||
|
||||
### `docker-network`
|
||||
|
||||
Specify a network to run container in.
|
||||
|
||||
You can use `${{ job.container.network }}` to run renovate container [in the same network as other containers for this job](https://docs.github.com/en/actions/learn-github-actions/contexts#job-context),
|
||||
or set it to `host` to run in the same network as github runner, or specify any custom network.
|
||||
|
||||
### `docker-socket-host-path`
|
||||
|
||||
Allows the overriding of the host path for the Docker socket that is mounted into the container.
|
||||
Useful on systems where the host Docker socket is located somewhere other than `/var/run/docker.sock` (the default).
|
||||
Only applicable when `mount-docker-socket` is true.
|
||||
|
||||
### `docker-user`
|
||||
|
||||
Specify a user (or user-id) to run docker command.
|
||||
|
||||
You can use it with [`docker-cmd-file`](#docker-cmd-file) in order to start the
|
||||
image as root, do some customization and switch back to a unprivileged user.
|
||||
|
||||
### `docker-volumes`
|
||||
|
||||
Specify volume mounts. Defaults to `/tmp:/tmp`.
|
||||
The volume mounts are separated through `;`.
|
||||
|
||||
This sample will mount `/tmp:/tmp` and `/foo:/bar`.
|
||||
|
||||
```yml
|
||||
....
|
||||
jobs:
|
||||
renovate:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v7.0.1
|
||||
- name: Self-hosted Renovate
|
||||
uses: renovatebot/github-action@v48.0.1
|
||||
with:
|
||||
token: ${{ secrets.RENOVATE_TOKEN }}
|
||||
docker-volumes: |
|
||||
/tmp:/tmp ;
|
||||
/foo:/bar
|
||||
```
|
||||
|
||||
### `env-regex`
|
||||
|
||||
Allows to configure the regex to define which environment variables are passed to the renovate container.
|
||||
See [Passing other environment variables](#passing-other-environment-variables) section for more details.
|
||||
|
||||
## `mount-docker-socket`
|
||||
|
||||
Default to `false`. If set to `true` the action will mount the Docker socket
|
||||
inside the renovate container so that the commands can use Docker. Can be useful
|
||||
for `postUpgradeTasks`'s commands. Also add the user inside the renovate
|
||||
container to the docker group for socket permissions.
|
||||
|
||||
### `token`
|
||||
|
||||
[Generate a Personal Access Token (classic)](https://github.com/settings/tokens), with the `repo:public_repo` scope for only public repositories or the `repo` scope for public and private repositories, and add it to _Secrets_ (repository settings) as `RENOVATE_TOKEN`.
|
||||
You can also create a token without a specific scope, which gives read-only access to public repositories, for testing.
|
||||
This token is only used by Renovate, see the [token configuration](https://docs.renovatebot.com/self-hosted-configuration/#token), and gives it access to the repositories.
|
||||
The name of the secret can be anything as long as it matches the argument given to the `token` option.
|
||||
|
||||
Fine-grained Personal Access Tokens are now supported, as GitHub has [implemented GraphQL API support for them](https://github.com/github/roadmap/issues/622).
|
||||
However, some permission gaps may remain (for example, around `Checks` access), so a classic token is still the safer default if you run into authentication or automerge limitations.
|
||||
|
||||
If you want to use the `github-actions` manager, you must setup a [special token](#special-token-requirements-when-using-the-github-actions-manager) with some requirements.
|
||||
|
||||
> [!NOTE]
|
||||
> [`GITHUB_TOKEN`](https://help.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token#permissions-for-the-github_token)
|
||||
> can be also used; however, workflows run on RenovateBot's PRs will need to be [manually approved](https://github.blog/changelog/2026-06-11-bot-created-pull-requests-can-run-workflows-if-approved/).
|
||||
>
|
||||
> Additionally, ["Allow GitHub Actions to create and approve pull requests"](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#preventing-github-actions-from-creating-or-approving-pull-requests)
|
||||
> needs to be enabled on the repository or organisation level.
|
||||
|
||||
### `renovate-image`
|
||||
|
||||
The Renovate Docker image name to use.
|
||||
If omitted the action will use the `ghcr.io/renovatebot/renovate:<renovate-version>` Docker image name otherwise.
|
||||
If a Docker image name is defined, the action will use that name to pull the image.
|
||||
|
||||
This sample will use `myproxyhub.domain.com/renovate/renovate:<renovate-version>` image.
|
||||
|
||||
```yml
|
||||
....
|
||||
jobs:
|
||||
renovate:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v7.0.1
|
||||
- name: Self-hosted Renovate
|
||||
uses: renovatebot/github-action@v48.0.1
|
||||
with:
|
||||
renovate-image: myproxyhub.domain.com/renovate/renovate
|
||||
token: ${{ secrets.RENOVATE_TOKEN }}
|
||||
```
|
||||
|
||||
This sample will use `ghcr.io/renovatebot/renovate:<renovate-version>` image.
|
||||
|
||||
```yml
|
||||
....
|
||||
jobs:
|
||||
renovate:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v7.0.1
|
||||
- name: Self-hosted Renovate
|
||||
uses: renovatebot/github-action@v48.0.1
|
||||
with:
|
||||
token: ${{ secrets.RENOVATE_TOKEN }}
|
||||
```
|
||||
|
||||
It is also possible to specify a full Docker image pinned to a version (and optionally, a digest) like so:
|
||||
|
||||
```yml
|
||||
....
|
||||
jobs:
|
||||
renovate:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v7.0.1
|
||||
- name: Self-hosted Renovate
|
||||
uses: renovatebot/github-action@v48.0.1
|
||||
with:
|
||||
renovate-image: ghcr.io/renovatebot/renovate@sha256:0f7ba2b70c5d1a7e2d95b0f6c3d5b4a1e2f6b6a1e2f6b6a1e2f6b6a1e2f6b6a1
|
||||
token: ${{ secrets.RENOVATE_TOKEN }}
|
||||
```
|
||||
|
||||
### `renovate-version`
|
||||
|
||||
The Renovate version to use.
|
||||
If omitted the action will use the [`default version`](./action.yml#L28) Docker tag.
|
||||
Check [the available tags on Docker Hub](https://hub.docker.com/r/renovate/renovate/tags).
|
||||
|
||||
This sample will use `ghcr.io/renovatebot/renovate:45.16.0` image.
|
||||
|
||||
```yml
|
||||
....
|
||||
jobs:
|
||||
renovate:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v7.0.1
|
||||
- name: Self-hosted Renovate
|
||||
uses: renovatebot/github-action@v48.0.1
|
||||
with:
|
||||
renovate-version: 45.16.0
|
||||
token: ${{ secrets.RENOVATE_TOKEN }}
|
||||
```
|
||||
|
||||
This sample will use `ghcr.io/renovatebot/renovate:full` image.
|
||||
|
||||
```yml
|
||||
....
|
||||
jobs:
|
||||
renovate:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v7.0.1
|
||||
- name: Self-hosted Renovate
|
||||
uses: renovatebot/github-action@v48.0.1
|
||||
with:
|
||||
renovate-version: full
|
||||
token: ${{ secrets.RENOVATE_TOKEN }}
|
||||
```
|
||||
|
||||
We recommend you pin the version of Renovate to a full version or a full checksum, and use Renovate's regex manager to create PRs to update the pinned version.
|
||||
See `.github/workflows/build.yml` for an example of how to do this.
|
||||
<a name="example"></a>
|
||||
|
||||
## Example
|
||||
|
||||
This example uses a Personal Access Token and will run every 15 minutes.
|
||||
The Personal Access token is configured as a GitHub secret named `RENOVATE_TOKEN`.
|
||||
This example uses the [`example/renovate-config.js`](./example/renovate-config.js) file as configuration.
|
||||
Live examples with more advanced configurations of this action can be found in the following repositories:
|
||||
|
||||
- [vidavidorra/renovate](https://github.com/vidavidorra/renovate/blob/main/.github/renovate.json)
|
||||
- [jenkinsci/helm-charts](https://github.com/jenkinsci/helm-charts/blob/main/.github/renovate-config.json5)
|
||||
|
||||
**Remark** Update the action version to the most current, see [here](https://github.com/renovatebot/github-action/releases/latest) for latest release.
|
||||
This example uses a personal access token and will run every 15 minutes. The personal access token is configured as a GitHub secret named `RENOVATE_TOKEN`. This example uses the [`example/config.js`](./example/config.js) file as configuration.
|
||||
You can also see a live example of this action in my [github-renovate](https://github.com/vidavidorra/github-renovate) repository, which also includes a more [advanced configuration](https://github.com/vidavidorra/github-renovate/blob/master/src/config.js) for updating GitHub Action workflows.
|
||||
|
||||
```yml
|
||||
name: Renovate
|
||||
@@ -311,285 +74,10 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v7.0.1
|
||||
uses: actions/checkout@v2.0.0
|
||||
- name: Self-hosted Renovate
|
||||
uses: renovatebot/github-action@v48.0.1
|
||||
uses: renovatebot/github-action@v1.0.0
|
||||
with:
|
||||
configurationFile: example/renovate-config.js
|
||||
configurationFile: example/config.js
|
||||
token: ${{ secrets.RENOVATE_TOKEN }}
|
||||
```
|
||||
|
||||
### Example for GitHub Enterprise
|
||||
|
||||
If you want to use the Renovate Action on a GitHub Enterprise instance you have to add the following environment variable:
|
||||
|
||||
```yml
|
||||
....
|
||||
- name: Self-hosted Renovate
|
||||
uses: renovatebot/github-action@v48.0.1
|
||||
with:
|
||||
configurationFile: example/renovate-config.js
|
||||
token: ${{ secrets.RENOVATE_TOKEN }}
|
||||
env:
|
||||
RENOVATE_ENDPOINT: "https://git.your-company.com/api/v3"
|
||||
```
|
||||
|
||||
### Example with GitHub App
|
||||
|
||||
Instead of using a Personal Access Token (PAT) that is tied to a particular user you can use a [GitHub App](https://docs.github.com/en/developers/apps/building-github-apps) where permissions can be even better tuned.
|
||||
[Create a new app](https://docs.github.com/en/developers/apps/creating-a-github-app) and configure the app permissions and your `config.js` as described in the [Renovate documentation](https://docs.renovatebot.com/modules/platform/github/#running-as-a-github-app).
|
||||
|
||||
Generate and download a new private key for the app, adding the contents of the downloaded `.pem` file to _Secrets_ (repository settings) with the name `private_key` and app ID as a secret with name `app_id`.
|
||||
|
||||
Adjust your Renovate configuration file to specify the username of your bot.
|
||||
|
||||
From the Github app configuration page, install the app in your account or your organization's account, and configure the repository access.
|
||||
|
||||
Going forward we will be using the [`actions/create-github-app-token` action](https://github.com/actions/create-github-app-token) in order to exchange the GitHub App certificate for an access token that Renovate can use.
|
||||
|
||||
The final workflow will look like this:
|
||||
|
||||
```yaml
|
||||
name: Renovate
|
||||
on:
|
||||
schedule:
|
||||
# The "*" (#42, asterisk) character has special semantics in YAML, so this
|
||||
# string has to be quoted.
|
||||
- cron: '0/15 * * * *'
|
||||
jobs:
|
||||
renovate:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Get token
|
||||
id: get_token
|
||||
uses: actions/create-github-app-token@v1
|
||||
with:
|
||||
private-key: ${{ secrets.private_key }}
|
||||
app-id: ${{ secrets.app_id }}
|
||||
owner: ${{ github.repository_owner }}
|
||||
repositories: 'repo1,repo2'
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v7.0.1
|
||||
|
||||
- name: Self-hosted Renovate
|
||||
uses: renovatebot/github-action@v48.0.1
|
||||
with:
|
||||
configurationFile: example/renovate-config.js
|
||||
token: '${{ steps.get_token.outputs.token }}'
|
||||
```
|
||||
|
||||
### Commit signing with GitHub App
|
||||
|
||||
Renovate can sign commits when deployed as a GitHub App by utilizing GitHub's API-based commits.
|
||||
To activate this, ensure that `platformCommit` is set to `enabled` in global config.
|
||||
If a configuration file is defined, include `platformCommit: enabled` to activate this feature.
|
||||
For example:
|
||||
|
||||
```yaml
|
||||
- name: Self-hosted Renovate
|
||||
uses: renovatebot/github-action@v48.0.1
|
||||
with:
|
||||
token: '${{ steps.get_token.outputs.token }}'
|
||||
env:
|
||||
RENOVATE_PLATFORM_COMMIT: 'enabled'
|
||||
```
|
||||
|
||||
## Environment Variables
|
||||
|
||||
Environment variables prefixed with `RENOVATE_` are passed through to the Docker container automatically. This prefix is reserved for [Renovate self-hosted configuration](https://docs.renovatebot.com/self-hosted-configuration/), so using it for unrelated credentials can accidentally conflict with a Renovate option.
|
||||
|
||||
For custom credentials, use a distinct prefix and add the variable to [`env-regex`](#passing-other-environment-variables).
|
||||
|
||||
For example if you wish to pass through some credentials for a [host rule](https://docs.renovatebot.com/configuration-options/#hostrules) to the `config.js` then you should do so like this.
|
||||
|
||||
1. In your workflow pass in the environment variable
|
||||
|
||||
```yml
|
||||
....
|
||||
jobs:
|
||||
renovate:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v7.0.1
|
||||
- name: Self-hosted Renovate
|
||||
uses: renovatebot/github-action@v48.0.1
|
||||
with:
|
||||
configurationFile: example/renovate-config.js
|
||||
token: ${{ secrets.RENOVATE_TOKEN }}
|
||||
env-regex: "^(?:RENOVATE_\\w+|LOG_LEVEL|GITHUB_COM_TOKEN|NODE_OPTIONS|NO_COLOR|(?:HTTPS?|NO)_PROXY|(?:https?|no)_proxy|CUSTOM_TFE_TOKEN)$"
|
||||
env:
|
||||
CUSTOM_TFE_TOKEN: ${{ secrets.MY_TFE_TOKEN }}
|
||||
```
|
||||
|
||||
1. In `example/renovate-config.js` include the hostRules block
|
||||
|
||||
```js
|
||||
module.exports = {
|
||||
hostRules: [
|
||||
{
|
||||
hostType: 'terraform-module',
|
||||
matchHost: 'app.terraform.io',
|
||||
token: process.env.CUSTOM_TFE_TOKEN,
|
||||
},
|
||||
],
|
||||
};
|
||||
```
|
||||
|
||||
### User agent
|
||||
|
||||
By default, the Action sets [`RENOVATE_USER_AGENT`](https://docs.renovatebot.com/self-hosted-configuration/#useragent) to `Renovate/{{renovateVersion}} (https://github.com/renovatebot/github-action)`, so that operators of registries can identify traffic coming from this Action.
|
||||
|
||||
To override it, set the `RENOVATE_USER_AGENT` environment variable on the Action step.
|
||||
|
||||
### Passing other environment variables
|
||||
|
||||
There are two ways to pass additional variables through to the Renovate container:
|
||||
|
||||
1. **Recommended:** use [`additional-env-list`](#additional-env-list) to list the names of the variables you want forwarded. This keeps the action's default `env-regex` in effect, so you'll continue to receive any future additions to the default allow-list. Variable names that are not present in the environment are silently ignored.
|
||||
2. Override [`env-regex`](#env-regex) with a custom regular expression. This gives you full control but also full ownership: if the action's default pattern changes, your override will not pick up those changes, and a typo in the regex can silently drop variables (including `RENOVATE_*` ones).
|
||||
|
||||
Example using `additional-env-list` (recommended):
|
||||
|
||||
```yml
|
||||
....
|
||||
jobs:
|
||||
renovate:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6.1.0
|
||||
- name: Self-hosted Renovate
|
||||
uses: renovatebot/github-action@v48.0.1
|
||||
with:
|
||||
configurationFile: example/renovate-config.js
|
||||
token: ${{ secrets.RENOVATE_TOKEN }}
|
||||
additional-env-list: |
|
||||
AWS_TOKEN
|
||||
MY_OTHER_SECRET
|
||||
env:
|
||||
AWS_TOKEN: ${{ secrets.AWS_TOKEN }}
|
||||
MY_OTHER_SECRET: ${{ secrets.MY_OTHER_SECRET }}
|
||||
```
|
||||
|
||||
Example using `env-regex` (full override):
|
||||
|
||||
```yml
|
||||
....
|
||||
jobs:
|
||||
renovate:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v7.0.1
|
||||
- name: Self-hosted Renovate
|
||||
uses: renovatebot/github-action@v48.0.1
|
||||
with:
|
||||
configurationFile: example/renovate-config.js
|
||||
token: ${{ secrets.RENOVATE_TOKEN }}
|
||||
env-regex: "^(?:RENOVATE_\\w+|LOG_LEVEL|GITHUB_COM_TOKEN|NODE_OPTIONS|AWS_TOKEN)$"
|
||||
env:
|
||||
AWS_TOKEN: ${{ secrets.AWS_TOKEN }}
|
||||
```
|
||||
|
||||
## Persisting the repository cache
|
||||
|
||||
In some cases, Renovate can update PRs more frequently than you expect. The [repository cache](https://docs.renovatebot.com/self-hosted-configuration/#repositorycache) can help with this issue. You need a few things to persist this cache in GitHub Actions:
|
||||
|
||||
1. Enable the `repositoryCache` [option](https://docs.renovatebot.com/self-hosted-configuration/#repositorycache) via env vars or renovate.json.
|
||||
2. Restore `/tmp/renovate/cache/renovate/repository` before Renovate runs.
|
||||
3. Save the updated directory under a new cache key after Renovate finishes.
|
||||
|
||||
Below is a workflow example with caching.
|
||||
|
||||
The primary key includes `github.run_id` and `github.run_attempt`, so each successful run or rerun can save its updated cache. `restore-keys` selects the most recent prior cache. The ownership fix is still required because the restored files are created by the runner but Renovate reads them inside its container as user `12021`.
|
||||
|
||||
```yml
|
||||
name: Renovate
|
||||
on:
|
||||
# This lets you dispatch a renovate job with different cache options if you want to reset or disable the cache manually.
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
repoCache:
|
||||
description: 'Reset or disable the cache?'
|
||||
type: choice
|
||||
default: enabled
|
||||
options:
|
||||
- enabled
|
||||
- disabled
|
||||
- reset
|
||||
schedule:
|
||||
# Run every 30 minutes:
|
||||
- cron: '0,30 * * * *'
|
||||
|
||||
# Adding these as env variables makes it easy to re-use them in different steps and in bash.
|
||||
env:
|
||||
# This is the dir renovate provides -- if we set our own directory via cacheDir, we can run into permissions issues.
|
||||
# It is also possible to cache a higher level of the directory, but it has minimal benefit. While renovate execution
|
||||
# time gets faster, it also takes longer to upload the cache as it grows bigger.
|
||||
cache_dir: /tmp/renovate/cache/renovate/repository
|
||||
# This can be manually changed to bust the cache if necessary.
|
||||
cache_key: renovate-cache
|
||||
|
||||
jobs:
|
||||
renovate:
|
||||
name: Renovate
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v7.0.1
|
||||
|
||||
- name: Restore renovate cache
|
||||
id: cache-restore
|
||||
if: github.event.inputs.repoCache != 'disabled' && github.event.inputs.repoCache != 'reset'
|
||||
uses: actions/cache/restore@v6.1.0
|
||||
with:
|
||||
path: ${{ env.cache_dir }}
|
||||
key: ${{ env.cache_key }}-${{ github.run_id }}-${{ github.run_attempt }}
|
||||
restore-keys: |
|
||||
${{ env.cache_key }}-
|
||||
|
||||
- name: Fix restored cache ownership
|
||||
if: steps.cache-restore.outputs.cache-matched-key != ''
|
||||
run: |
|
||||
sudo chown -R 12021:0 /tmp/renovate/
|
||||
ls -R $cache_dir
|
||||
|
||||
- uses: renovatebot/github-action@v48.0.1
|
||||
with:
|
||||
configurationFile: renovate.json5
|
||||
token: ${{ secrets.RENOVATE_TOKEN }}
|
||||
renovate-version: 45.16.0
|
||||
env:
|
||||
# This enables the cache -- if this is set, it's not necessary to add it to renovate.json.
|
||||
RENOVATE_REPOSITORY_CACHE: ${{ github.event.inputs.repoCache || 'enabled' }}
|
||||
|
||||
- name: Save renovate cache
|
||||
if: github.event.inputs.repoCache != 'disabled' && steps.cache-restore.outputs.cache-hit != 'true'
|
||||
uses: actions/cache/save@v6.1.0
|
||||
with:
|
||||
path: ${{ env.cache_dir }}
|
||||
key: ${{ env.cache_key }}-${{ github.run_id }}-${{ github.run_attempt }}
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Debug logging
|
||||
|
||||
In case of issues, it's always a good idea to enable debug logging first.
|
||||
To enable debug logging, add the environment variable `LOG_LEVEL: 'debug'` to the action:
|
||||
|
||||
```yml
|
||||
- name: Self-hosted Renovate
|
||||
uses: renovatebot/github-action@v48.0.1
|
||||
with:
|
||||
configurationFile: example/renovate-config.js
|
||||
token: ${{ secrets.RENOVATE_TOKEN }}
|
||||
env:
|
||||
LOG_LEVEL: 'debug'
|
||||
```
|
||||
|
||||
### Special token requirements when using the `github-actions` manager
|
||||
|
||||
If you want to use the `github-actions` [manager](https://docs.renovatebot.com/modules/manager/github-actions/) in Renovate, ensure that the `token` you provide contains the `workflow` scope.
|
||||
Otherwise, GitHub does not allow Renovate to update workflow files and therefore it will be unable to create update PRs for affected packages (like `actions/checkout` or `renovatebot/github-action` itself).
|
||||
+6
-58
@@ -1,4 +1,4 @@
|
||||
name: 'Renovate Bot GitHub Action'
|
||||
name: 'Self-Hosted Renovate'
|
||||
description: 'GitHub Action to run self-hosted Renovate.'
|
||||
author: 'Jeroen de Bruijn'
|
||||
branding:
|
||||
@@ -6,66 +6,14 @@ branding:
|
||||
color: blue
|
||||
inputs:
|
||||
configurationFile:
|
||||
description: |
|
||||
Configuration file to configure Renovate. Either use this input or the
|
||||
'RENOVATE_CONFIG_FILE' environment variable.
|
||||
description: 'Configuration file to configure Renovate'
|
||||
required: false
|
||||
default: src/config.js
|
||||
token:
|
||||
description: |
|
||||
GitHub personal access token that Renovate should use. This should be
|
||||
configured using a Secret. Either use this input or the 'RENOVATE_TOKEN'
|
||||
environment variable.
|
||||
required: false
|
||||
env-regex:
|
||||
description: |
|
||||
Override the environment variables which will be passed into the renovate container.
|
||||
Defaults to `^(?:RENOVATE_\\w+|LOG_LEVEL|GITHUB_COM_TOKEN|NODE_OPTIONS|NO_COLOR|(?:HTTPS?|NO)_PROXY|(?:https?|no)_proxy)$`
|
||||
required: false
|
||||
additional-env-list:
|
||||
description: |
|
||||
A newline-separated list of environment variable names to pass through to the Renovate container, in addition to those already matched by env-regex.
|
||||
required: false
|
||||
renovate-version:
|
||||
description: |
|
||||
Renovate version to use.
|
||||
required: false
|
||||
default: '45' # renovate
|
||||
renovate-image:
|
||||
description: |
|
||||
Renovate docker image name.
|
||||
required: false
|
||||
default: ghcr.io/renovatebot/renovate
|
||||
mount-docker-socket:
|
||||
description: |
|
||||
Mount the Docker socket inside the renovate container so that the commands
|
||||
can use Docker. Also add the user inside the renovate container to the
|
||||
docker group for socket permissions.
|
||||
required: false
|
||||
docker-socket-host-path:
|
||||
description: |
|
||||
Allows the overriding of the host path for the Docker socket that is mounted into the container.
|
||||
Useful on systems where the host Docker socket is located somewhere other than '/var/run/docker.sock' (the default).
|
||||
Only applicable when 'mount-docker-socket' is true.
|
||||
required: false
|
||||
default: /var/run/docker.sock
|
||||
docker-cmd-file:
|
||||
description: |
|
||||
Override docker command. Default command is `renovate`
|
||||
required: false
|
||||
docker-network:
|
||||
description: |
|
||||
Docker network.
|
||||
required: false
|
||||
docker-user:
|
||||
description: |
|
||||
Docker user. Default to an unprivileged user
|
||||
required: false
|
||||
docker-volumes:
|
||||
description: |
|
||||
Docker volume mounts. Default to /tmp:/tmp
|
||||
default: /tmp:/tmp
|
||||
required: false
|
||||
|
||||
configured using a Secret.
|
||||
required: true
|
||||
runs:
|
||||
using: node24
|
||||
using: node12
|
||||
main: dist/index.js
|
||||
@@ -1,3 +1,3 @@
|
||||
export default {
|
||||
module.exports = {
|
||||
extends: ['@commitlint/config-conventional'],
|
||||
};
|
||||
Vendored
+1723
-53
File diff suppressed because it is too large.
Load diff
Vendored
-7
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../tools/cjs-shim.ts", "../node_modules/.pnpm/tunnel@0.0.6/node_modules/tunnel/lib/tunnel.js", "../node_modules/.pnpm/tunnel@0.0.6/node_modules/tunnel/index.js", "../node_modules/.pnpm/undici@6.29.1/node_modules/undici/lib/core/symbols.js", "../node_modules/.pnpm/undici@6.29.1/node_modules/undici/lib/core/errors.js", "../node_modules/.pnpm/undici@6.29.1/node_modules/undici/lib/core/constants.js", "../node_modules/.pnpm/undici@6.29.1/node_modules/undici/lib/core/tree.js", "../node_modules/.pnpm/undici@6.29.1/node_modules/undici/lib/core/util.js", "../node_modules/.pnpm/undici@6.29.1/node_modules/undici/lib/core/diagnostics.js", "../node_modules/.pnpm/undici@6.29.1/node_modules/undici/lib/core/request.js", "../node_modules/.pnpm/undici@6.29.1/node_modules/undici/lib/dispatcher/dispatcher.js", "../node_modules/.pnpm/undici@6.29.1/node_modules/undici/lib/dispatcher/dispatcher-base.js", "../node_modules/.pnpm/undici@6.29.1/node_modules/undici/lib/util/timers.js", "../node_modules/.pnpm/undici@6.29.1/node_modules/undici/lib/core/connect.js", "../node_modules/.pnpm/undici@6.29.1/node_modules/undici/lib/llhttp/utils.js", "../node_modules/.pnpm/undici@6.29.1/node_modules/undici/lib/llhttp/constants.js", "../node_modules/.pnpm/undici@6.29.1/node_modules/undici/lib/llhttp/llhttp-wasm.js", "../node_modules/.pnpm/undici@6.29.1/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js", "../node_modules/.pnpm/undici@6.29.1/node_modules/undici/lib/web/fetch/constants.js", "../node_modules/.pnpm/undici@6.29.1/node_modules/undici/lib/web/fetch/global.js", "../node_modules/.pnpm/undici@6.29.1/node_modules/undici/lib/web/fetch/data-url.js", "../node_modules/.pnpm/undici@6.29.1/node_modules/undici/lib/web/fetch/webidl.js", "../node_modules/.pnpm/undici@6.29.1/node_modules/undici/lib/web/fetch/util.js", "../node_modules/.pnpm/undici@6.29.1/node_modules/undici/lib/web/fetch/symbols.js", "../node_modules/.pnpm/undici@6.29.1/node_modules/undici/lib/web/fetch/file.js", "../node_modules/.pnpm/undici@6.29.1/node_modules/undici/lib/web/fetch/formdata.js", "../node_modules/.pnpm/undici@6.29.1/node_modules/undici/lib/web/fetch/formdata-parser.js", "../node_modules/.pnpm/undici@6.29.1/node_modules/undici/lib/web/fetch/body.js", "../node_modules/.pnpm/undici@6.29.1/node_modules/undici/lib/dispatcher/client-h1.js", "../node_modules/.pnpm/undici@6.29.1/node_modules/undici/lib/dispatcher/client-h2.js", "../node_modules/.pnpm/undici@6.29.1/node_modules/undici/lib/handler/redirect-handler.js", "../node_modules/.pnpm/undici@6.29.1/node_modules/undici/lib/interceptor/redirect-interceptor.js", "../node_modules/.pnpm/undici@6.29.1/node_modules/undici/lib/dispatcher/client.js", "../node_modules/.pnpm/undici@6.29.1/node_modules/undici/lib/dispatcher/fixed-queue.js", "../node_modules/.pnpm/undici@6.29.1/node_modules/undici/lib/dispatcher/pool-stats.js", "../node_modules/.pnpm/undici@6.29.1/node_modules/undici/lib/dispatcher/pool-base.js", "../node_modules/.pnpm/undici@6.29.1/node_modules/undici/lib/dispatcher/pool.js", "../node_modules/.pnpm/undici@6.29.1/node_modules/undici/lib/dispatcher/balanced-pool.js", "../node_modules/.pnpm/undici@6.29.1/node_modules/undici/lib/dispatcher/agent.js", "../node_modules/.pnpm/undici@6.29.1/node_modules/undici/lib/dispatcher/proxy-agent.js", "../node_modules/.pnpm/undici@6.29.1/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js", "../node_modules/.pnpm/undici@6.29.1/node_modules/undici/lib/handler/retry-handler.js", "../node_modules/.pnpm/undici@6.29.1/node_modules/undici/lib/dispatcher/retry-agent.js", "../node_modules/.pnpm/undici@6.29.1/node_modules/undici/lib/api/readable.js", "../node_modules/.pnpm/undici@6.29.1/node_modules/undici/lib/api/util.js", "../node_modules/.pnpm/undici@6.29.1/node_modules/undici/lib/api/api-request.js", "../node_modules/.pnpm/undici@6.29.1/node_modules/undici/lib/api/abort-signal.js", "../node_modules/.pnpm/undici@6.29.1/node_modules/undici/lib/api/api-stream.js", "../node_modules/.pnpm/undici@6.29.1/node_modules/undici/lib/api/api-pipeline.js", "../node_modules/.pnpm/undici@6.29.1/node_modules/undici/lib/api/api-upgrade.js", "../node_modules/.pnpm/undici@6.29.1/node_modules/undici/lib/api/api-connect.js", "../node_modules/.pnpm/undici@6.29.1/node_modules/undici/lib/api/index.js", "../node_modules/.pnpm/undici@6.29.1/node_modules/undici/lib/mock/mock-errors.js", "../node_modules/.pnpm/undici@6.29.1/node_modules/undici/lib/mock/mock-symbols.js", "../node_modules/.pnpm/undici@6.29.1/node_modules/undici/lib/mock/mock-utils.js", "../node_modules/.pnpm/undici@6.29.1/node_modules/undici/lib/mock/mock-interceptor.js", "../node_modules/.pnpm/undici@6.29.1/node_modules/undici/lib/mock/mock-client.js", "../node_modules/.pnpm/undici@6.29.1/node_modules/undici/lib/mock/mock-pool.js", "../node_modules/.pnpm/undici@6.29.1/node_modules/undici/lib/mock/pluralizer.js", "../node_modules/.pnpm/undici@6.29.1/node_modules/undici/lib/mock/pending-interceptors-formatter.js", "../node_modulLine truncated
|
||||
"sourcesContent": ["// https://github.com/evanw/esbuild/issues/1921#issuecomment-1898197331\nimport { createRequire } from 'node:module';\nimport path from 'node:path';\nimport url from 'node:url';\n\nglobalThis.require = createRequire(import.meta.url);\nglobalThis.__filename = url.fileURLToPath(import.meta.url);\nglobalThis.__dirname = path.dirname(__filename);\n", "'use strict';\n\nvar net = require('net');\nvar tls = require('tls');\nvar http = require('http');\nvar https = require('https');\nvar events = require('events');\nvar assert = require('assert');\nvar util = require('util');\n\n\nexports.httpOverHttp = httpOverHttp;\nexports.httpsOverHttp = httpsOverHttp;\nexports.httpOverHttps = httpOverHttps;\nexports.httpsOverHttps = httpsOverHttps;\n\n\nfunction httpOverHttp(options) {\n var agent = new TunnelingAgent(options);\n agent.request = http.request;\n return agent;\n}\n\nfunction httpsOverHttp(options) {\n var agent = new TunnelingAgent(options);\n agent.request = http.request;\n agent.createSocket = createSecureSocket;\n agent.defaultPort = 443;\n return agent;\n}\n\nfunction httpOverHttps(options) {\n var agent = new TunnelingAgent(options);\n agent.request = https.request;\n return agent;\n}\n\nfunction httpsOverHttps(options) {\n var agent = new TunnelingAgent(options);\n agent.request = https.request;\n agent.createSocket = createSecureSocket;\n agent.defaultPort = 443;\n return agent;\n}\n\n\nfunction TunnelingAgent(options) {\n var self = this;\n self.options = options || {};\n self.proxyOptions = self.options.proxy || {};\n self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets;\n self.requests = [];\n self.sockets = [];\n\n self.on('free', function onFree(socket, host, port, localAddress) {\n var options = toOptions(host, port, localAddress);\n for (var i = 0, len = self.requests.length; i < len; ++i) {\n var pending = self.requests[i];\n if (pending.host === options.host && pending.port === options.port) {\n // Detect the request to connect same origin server,\n // reuse the connection.\n self.requests.splice(i, 1);\n pending.request.onSocket(socket);\n return;\n }\n }\n socket.destroy();\n self.removeSocket(socket);\n });\n}\nutil.inherits(TunnelingAgent, events.EventEmitter);\n\nTunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) {\n var self = this;\n var options = mergeOptions({request: req}, self.options, toOptions(host, port, localAddress));\n\n if (self.sockets.length >= this.maxSockets) {\n // We are over limit so we'll add it to the queue.\n self.requests.push(options);\n return;\n }\n\n // If we are under maxSockets create a new one.\n self.createSocket(options, function(socket) {\n socket.on('free', onFree);\n socket.on('close', onCloseOrRemove);\n socket.on('agentRemove', onCloseOrRemove);\n req.onSocket(socket);\n\n function onFree() {\n self.emit('free', socket, options);\n }\n\n function onCloseOrRemove(err) {\n self.removeSocket(socket);\n socket.removeListener('free', onFree);\n socket.removeListener('close', onCloseOrRemove);\n socket.removeListener('agentRemove', onCloseOrRemove);\n }\n });\n};\n\nTunnelingAgent.prototype.createSocket = function createSocket(options, cb) {\n var self = this;\n var placeholder = {};\n self.sockets.push(placeholder);\n\n var connectOptions = mergeOptions({}, self.proxyOptions, {\n method: 'CONNECT',\n path: options.host + ':' + options.port,\n agent: false,\n headers: {\n host: options.host + ':' + options.port\n }\n });\n if (options.localAddress) {\n connectOptions.localAddress = options.localAddress;\n }\n if (connectOptions.proxyAuth) {\n connectOptions.headers = connectOptions.headers || {};\n connectOptions.headers['Proxy-Authorization'] = 'Basic ' +\n new Buffer(connectOptions.proxyAuth).toString('base64');\n }\n\n debug('making CONNECT request');\n var connectReq = self.request(connectOptions);\n connectReq.useChunkedEncodingByDefault = false; // for v0.6\n connectReq.once('response', onResponse); // for v0.6\n connectReq.once('upgrade', onUpgrade); // for v0.6\n connectReq.once('connect', onConnect); // for v0.7 or later\n connectReq.once('error', onError);\n connectReq.end();\n\n function onResponse(res) {\n // Very hacky. This is necessary to avoid http-parser leaks.\n res.upgrade = true;\n }\n\n function onUpgrade(res, socket, head) {\n // Hacky.\n process.nextTick(function() {\n onConnect(res, socket, head);\n });\n }\n\n function onConnect(res, socket, head) {\n connectReq.removeAllListeners();\n socket.removeAllListeners();\n\n if (res.statusCode !== 200) {\n debug('tunneling socket could not be established, statusCode=%d',\n res.statusCode);\n socket.destroy();\n var error = new Error('tunneling socketLine truncated
|
||||
"mappings": "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 truncated
|
||||
"names": ["createRequire", "path", "url", "init_cjs_shim", "__esmMin", "require_tunnel", "__commonJSMin", "exports", "init_cjs_shim", "net", "tls", "http", "https", "events", "assert", "util", "httpOverHttp", "httpsOverHttp", "httpOverHttps", "httpsOverHttps", "options", "agent", "TunnelingAgent", "createSecureSocket", "self", "socket", "host", "port", "localAddress", "toOptions", "i", "len", "pending", "req", "mergeOptions", "onFree", "onCloseOrRemove", "err", "cb", "placeholder", "connectOptions", "debug", "connectReq", "onResponse", "onUpgrade", "onConnect", "onError", "res", "head", "error", "cause", "pos", "hostHeader", "tlsOptions", "secureSocket", "target", "overrides", "keys", "j", "keyLen", "k", "args", "require_tunnel", "__commonJSMin", "exports", "module", "init_cjs_shim", "require_symbols", "__commonJSMin", "exports", "module", "init_cjs_shim", "require_errors", "__commonJSMin", "exports", "module", "init_cjs_shim", "kUndiciError", "UndiciError", "message", "instance", "kConnectTimeoutError", "ConnectTimeoutError", "kHeadersTimeoutError", "HeadersTimeoutError", "kHeadersOverflowError", "HeadersOverflowError", "kBodyTimeoutError", "BodyTimeoutError", "kResponseStatusCodeError", "ResponseStatusCodeError", "statusCode", "headers", "body", "kInvalidArgumentError", "InvalidArgumentError", "kInvalidReturnValueError", "InvalidReturnValueError", "kAbortError", "AbortError", "kRequestAbortedError", "RequestAbortedError", "kInformationalError", "InformationalError", "kRequestContentLengthMismatchError", "RequestContentLengthMismatchError", "kResponseContentLengthMismatchError", "ResponseContentLengthMismatchError", "kClientDestroyedError", "ClientDestroyedError", "kClientClosedError", "ClientClosedError", "kSocketError", "SocketError", "socket", "kNotSupportedError", "NotSupportedError", "kBalancedPoolMissingUpstreamError", "BalancedPoolMissingUpstreamError", "kHTTPParserError", "HTTPParserError", "code", "data", "kResponseExceededMaxSizeError", "ResponseExceededMaxSizeError", "kRequestRetryError", "RequestRetryError", "kResponseError", "ResponseError", "kSecureProxyConnectionError", "SecureProxyConnectionError", "cause", "options", "kMessageSizeExceededError", "MessageSizeExceededError", "require_constants", "__commonJSMin", "exports", "module", "init_cjs_shim", "headerNameLowerCasedRecord", "wellknownHeaderNames", "i", "key", "lowerCasedKey", "require_tree", "__commonJSMin", "exports", "module", "init_cjs_shim", "wellknownHeaderNames", "headerNameLowerCasedRecord", "TstNode", "_TstNode", "key", "value", "index", "length", "node", "code", "keylength", "TernarySearchTree", "tree", "i", "require_util", "__commonJSMin", "exports", "module", "init_cjs_shim", "assert", "kDestroyed", "kBodyUsed", "kListeners", "kBody", "IncomingMessage", "stream", "net", "Blob", "nodeUtil", "stringify", "EE", "InvalidArgumentError", "headerNameLowerCasedRecord", "tree", "nodeMajor", "nodeMinor", "v", "BodyAsyncIterable", "body", "wrapRequestBody", "isStream", "bodyLength", "isIterable", "nop", "obj", "isBlobLike", "object", "sTag", "buildURL", "url", "queryParams", "stringified", "isValidPort", "port", "value", "isHttpOrHttpsPrefixed", "parseURL", "origin", "path", "parseOrigin", "getHostname", "host", "idx", "getServerName", "servername", "deepClone", "isAsyncIterable", "state", "isBuffer", "isDestroyed", "destroy", "err", "KEEPALIVE_TIMEOUT_EXPR", "parseKeepAliveTimeout", "val", "m", "headerNameToString", "bufferToLowerCasedHeaderName", "parseHeaders", "headers", "i", "key", "headersValue", "x", "parseRawHeaders", "len", "ret", "hasContentLength", "contentDispositionIdx", "kLen", "n", "buffer", "validateHandler", "handler", "method", "upgrade", "isDisturbed", "isErrored", "isReadable", "getSocketInfo", "socket", "ReadableStreamFrom", "iterable", "iterator", "controller", "done", "buf", "reason", "isFormDataLike", "addAbortListener", "signal", "listener", "hasToWellFormed", "hasIsWellFormed", "toUSVString", "isUSVString", "isTokenCharCode", "c", "isValidHTTPToken", "characters", "headerCharRegex", "isValidHeaderValue", "parseRangeHeader", "range", "addListener", "name", "removeAllListeners", "errorRequest", "client", "request", "kEnumerableProperty", "normalizedMethodRecordsBase", "normalizedMethodRecords", "require_diagnostics", "__commonJSMin", "exports", "module", "init_cjs_shim", "diagnosticsChannel", "util", "undiciDebugLog", "fetchDebuglog", "websocketDebuglog", "isClientSet", "channels", "debuglog", "evt", "version", "protocol", "port", "host", "error", "method", "path", "origin", "statusCode", "address", "websocket", "code", "reason", "err", "require_request", "__commonJSMin", "exports", "module", "init_cjs_shim", "InvalidArgumentError", "NotSupportedError", "assert", "isValidHTTPToken", "isValidHeaderValue", "isStream", "destroy", "isBuffer", "isFormDataLike", "isIterable", "isBlobLike", "buildURL", "validateHandler", "getServerName", "normalizedMethodRecords", "channels", "headerNameLowerCasedRecord", "invalidPatLine truncated
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
install-apt sl
|
||||
|
||||
exec runuser -u ubuntu renovate
|
||||
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"type": "commonjs"
|
||||
}
|
||||
@@ -1,18 +1,29 @@
|
||||
module.exports = {
|
||||
branchPrefix: 'test-renovate/',
|
||||
username: 'renovate-release',
|
||||
dryRun: true,
|
||||
gitAuthor: 'Renovate Bot <bot@renovateapp.com>',
|
||||
logLevel: 'debug',
|
||||
onboarding: false,
|
||||
platform: 'github',
|
||||
forkProcessing: 'enabled',
|
||||
dryRun: 'full',
|
||||
repositories: ['renovate-tests/cocoapods1', 'renovate-tests/gomod1'],
|
||||
includeForks: true,
|
||||
repositories: [
|
||||
'renovatebot/github-action',
|
||||
'renovate-tests/cocoapods1',
|
||||
'renovate-tests/gomod1',
|
||||
],
|
||||
packageRules: [
|
||||
{
|
||||
description: 'lockFileMaintenance',
|
||||
matchUpdateTypes: ['pin', 'digest', 'patch', 'minor', 'major', 'lockFileMaintenance'],
|
||||
dependencyDashboardApproval: false,
|
||||
minimumReleaseAge: null,
|
||||
updateTypes: [
|
||||
'pin',
|
||||
'digest',
|
||||
'patch',
|
||||
'minor',
|
||||
'major',
|
||||
'lockFileMaintenance',
|
||||
],
|
||||
masterIssueApproval: false,
|
||||
stabilityDays: 0,
|
||||
},
|
||||
],
|
||||
};
|
||||
@@ -1,22 +0,0 @@
|
||||
{
|
||||
"branchPrefix": "test-renovate/",
|
||||
"dryRun": "full",
|
||||
"username": "renovate-release",
|
||||
"gitAuthor": "Renovate Bot <bot@renovateapp.com>",
|
||||
"onboarding": false,
|
||||
"platform": "github",
|
||||
"forkProcessing": "enabled",
|
||||
"repositories": [
|
||||
"renovatebot/github-action",
|
||||
"renovate-tests/cocoapods1",
|
||||
"renovate-tests/gomod1"
|
||||
],
|
||||
"packageRules": [
|
||||
{
|
||||
"description": "lockFileMaintenance",
|
||||
"matchUpdateTypes": ["pin", "digest", "patch", "minor", "major", "lockFileMaintenance"],
|
||||
"dependencyDashboardApproval": false,
|
||||
"minimumReleaseAge": "1 day"
|
||||
}
|
||||
]
|
||||
}
|
||||
Generated
+4859
File diff suppressed because it is too large.
Load diff
+44
-51
@@ -1,64 +1,57 @@
|
||||
{
|
||||
"name": "github-action",
|
||||
"version": "48.0.1",
|
||||
"private": true,
|
||||
"version": "19.230.0",
|
||||
"description": "GitHub Action to run Renovate self-hosted.",
|
||||
"homepage": "https://github.com/renovatebot/github-action#readme",
|
||||
"bugs": {
|
||||
"url": "https://github.com/renovatebot/github-action/issues"
|
||||
"private": true,
|
||||
"main": "dist/index.js",
|
||||
"scripts": {
|
||||
"build:dist": "cd src && ncc build ./index.ts -o ../dist",
|
||||
"build": "cd src && ncc build ./index.ts -o ../dist",
|
||||
"format": "prettier --write \"**/*.{js,jsx,vue,ts,css,less,scss,html,htm,json,md,markdown,yml,yaml}\"",
|
||||
"format:file": "prettier --write",
|
||||
"git:dist": "git add -f dist",
|
||||
"lint": "concurrently npm:lint-es",
|
||||
"lint:fix": "concurrently npm:lint-es:fix",
|
||||
"lint-es": "eslint --ext .ts,.tsx,.js,.jsx,.json .",
|
||||
"lint-es:file": "eslint --ext .ts,.tsx,.js,.jsx,.json",
|
||||
"lint-es:fix": "eslint --ext .ts,.tsx,.js,.jsx,.json --fix .",
|
||||
"lint-es:file:fix": "eslint --ext .ts,.tsx,.js,.jsx,.json --fix",
|
||||
"start": "run-s build:dist && node dist",
|
||||
"version": "run-s build:* git:*"
|
||||
},
|
||||
"license": "GPL-3.0-or-later",
|
||||
"author": "Jeroen de Bruijn",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/renovatebot/github-action.git"
|
||||
},
|
||||
"type": "module",
|
||||
"main": "src/index.ts",
|
||||
"scripts": {
|
||||
"build": "run-s clean compile",
|
||||
"clean": "rimraf dist/",
|
||||
"compile": "node tools/compile.js",
|
||||
"lint": "run-s lint:*",
|
||||
"lint:oxlint": "oxlint",
|
||||
"lint:oxfmt": "oxfmt --check",
|
||||
"fix": "run-s fix:*",
|
||||
"fix:oxlint": "oxlint --fix",
|
||||
"fix:oxfmt": "oxfmt",
|
||||
"prepare": "husky",
|
||||
"release": "run-s clean build semantic-release",
|
||||
"semantic-release": "semantic-release",
|
||||
"start": "run-s build && node dist"
|
||||
"author": "Jeroen de Bruijn",
|
||||
"license": "GPL-3.0-or-later",
|
||||
"bugs": {
|
||||
"url": "https://github.com/renovatebot/github-action/issues"
|
||||
},
|
||||
"homepage": "https://github.com/renovatebot/github-action#readme",
|
||||
"dependencies": {
|
||||
"@actions/core": "3.0.1",
|
||||
"@actions/exec": "3.0.0"
|
||||
"@actions/core": "1.2.4",
|
||||
"@actions/exec": "1.0.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@commitlint/cli": "21.3.0",
|
||||
"@commitlint/config-conventional": "21.3.0",
|
||||
"@containerbase/oxlint-plugin": "1.1.0",
|
||||
"@semantic-release/git": "11.0.1",
|
||||
"@semantic-release/github": "12.0.11",
|
||||
"@semantic-release/npm": "13.2.0",
|
||||
"@tsconfig/node24": "24.0.6",
|
||||
"@tsconfig/strictest": "2.0.9",
|
||||
"@types/node": "24.19.4",
|
||||
"conventional-changelog-conventionalcommits": "9.3.1",
|
||||
"esbuild": "0.28.2",
|
||||
"husky": "9.1.7",
|
||||
"lint-staged": "17.6.3",
|
||||
"npm-run-all2": "9.1.0",
|
||||
"oxfmt": "0.80.0",
|
||||
"oxlint": "1.95.0",
|
||||
"oxlint-tsgolint": "7.0.2009",
|
||||
"rimraf": "6.1.4",
|
||||
"semantic-release": "25.0.9",
|
||||
"typescript": "5.9.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=24.11.0",
|
||||
"pnpm": "^10.0.0"
|
||||
},
|
||||
"packageManager": "pnpm@10.34.9"
|
||||
"@commitlint/cli": "8.3.5",
|
||||
"@commitlint/config-conventional": "8.3.4",
|
||||
"@types/node": "13.13.4",
|
||||
"@typescript-eslint/eslint-plugin": "2.31.0",
|
||||
"@typescript-eslint/parser": "2.31.0",
|
||||
"@zeit/ncc": "0.22.1",
|
||||
"chalk-cli": "4.1.0",
|
||||
"concurrently": "5.2.0",
|
||||
"eslint": "6.8.0",
|
||||
"eslint-config-prettier": "6.11.0",
|
||||
"eslint-plugin-json": "2.1.1",
|
||||
"eslint-plugin-prettier": "3.1.3",
|
||||
"husky": "4.2.5",
|
||||
"lint-staged": "10.2.2",
|
||||
"next-standard-version": "2.1.2",
|
||||
"npm-run-all": "4.1.5",
|
||||
"prettier": "2.0.5",
|
||||
"standard-version": "7.1.0",
|
||||
"typescript": "3.8.3"
|
||||
}
|
||||
}
|
||||
Generated
-3747
File diff suppressed because it is too large.
Load diff
@@ -1,18 +0,0 @@
|
||||
strictPeerDependencies: true
|
||||
saveExact: true
|
||||
dedupePeers: true
|
||||
# updates are handled by Renovate itself
|
||||
updateNotifier: false
|
||||
|
||||
allowBuilds:
|
||||
esbuild: false
|
||||
|
||||
# in line with https://github.com/renovatebot/.github/blob/main/default.json,
|
||||
# all non-Renovate or non-Containerbase packages should only be installed after
|
||||
# 7 days
|
||||
minimumReleaseAge: 10080
|
||||
minimumReleaseAgeExclude:
|
||||
- '@renovatebot/*'
|
||||
- '@containerbase/*'
|
||||
# Renovate security update: esbuild@0.28.1
|
||||
- esbuild@0.28.1
|
||||
+11
-31
@@ -1,35 +1,15 @@
|
||||
import { info, warning } from '@actions/core';
|
||||
import type { Input } from './input';
|
||||
|
||||
export class Docker {
|
||||
private static readonly image = 'ghcr.io/renovatebot/renovate';
|
||||
private static readonly version = '45'; // renovate
|
||||
|
||||
private readonly fullImageReference: string;
|
||||
|
||||
constructor(input: Input) {
|
||||
let image = input.getDockerImage();
|
||||
let version = input.getVersion();
|
||||
|
||||
if (image?.includes(':')) {
|
||||
info(`Docker image looks like it contains a version, using that as the image itself`);
|
||||
this.fullImageReference = image;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!image) {
|
||||
warning(`No Docker image specified, using ${Docker.image}`);
|
||||
image = Docker.image;
|
||||
}
|
||||
if (!version) {
|
||||
warning(`No Docker version specified, using ${Docker.version}`);
|
||||
version = Docker.version;
|
||||
}
|
||||
|
||||
this.fullImageReference = `${image}:${version}`;
|
||||
}
|
||||
class Docker {
|
||||
readonly repository = 'renovate/renovate';
|
||||
// renovate: datasource=docker depName=renovate/renovate versioning=docker
|
||||
readonly tag = '19.230.0';
|
||||
|
||||
image(): string {
|
||||
return this.fullImageReference;
|
||||
return `${this.repository}:${this.tag}`;
|
||||
}
|
||||
|
||||
version(): string {
|
||||
return this.tag;
|
||||
}
|
||||
}
|
||||
|
||||
export default Docker;
|
||||
+6
-11
@@ -1,22 +1,17 @@
|
||||
import { group, notice, setFailed } from '@actions/core';
|
||||
import { Input } from './input';
|
||||
import { Renovate } from './renovate';
|
||||
import * as core from '@actions/core';
|
||||
import Input from './input';
|
||||
import Renovate from './renovate';
|
||||
|
||||
async function run(): Promise<void> {
|
||||
try {
|
||||
const input = new Input();
|
||||
const renovate = new Renovate(input);
|
||||
|
||||
await group('Check Renovate version', async () => {
|
||||
const version = await renovate.runDockerContainerForVersion();
|
||||
notice(version, { title: 'Renovate CLI version' });
|
||||
});
|
||||
const renovate = new Renovate(input.configurationFile, input.token);
|
||||
|
||||
await renovate.runDockerContainer();
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
setFailed(error as Error);
|
||||
core.setFailed(error.message);
|
||||
}
|
||||
}
|
||||
|
||||
void run();
|
||||
run();
|
||||
+14
-131
@@ -1,137 +1,20 @@
|
||||
import path from 'node:path';
|
||||
import { getInput, getMultilineInput, warning } from '@actions/core';
|
||||
import * as core from '@actions/core';
|
||||
|
||||
export interface EnvironmentVariable {
|
||||
key: string;
|
||||
value: string;
|
||||
}
|
||||
|
||||
export class Input {
|
||||
readonly options = {
|
||||
envRegex:
|
||||
/^(?:RENOVATE_\w+|LOG_LEVEL|GITHUB_COM_TOKEN|NODE_OPTIONS|NO_COLOR|(?:HTTPS?|NO)_PROXY|(?:https?|no)_proxy)$/,
|
||||
configurationFile: {
|
||||
input: 'configurationFile',
|
||||
env: 'RENOVATE_CONFIG_FILE',
|
||||
optional: true,
|
||||
},
|
||||
token: {
|
||||
input: 'token',
|
||||
env: 'RENOVATE_TOKEN',
|
||||
optional: false,
|
||||
},
|
||||
} as const;
|
||||
readonly token: Readonly<EnvironmentVariable>;
|
||||
|
||||
private readonly _environmentVariables: Map<string, string>;
|
||||
private readonly _configurationFile: Readonly<EnvironmentVariable>;
|
||||
class Input {
|
||||
readonly configurationFile = core.getInput('configurationFile', {
|
||||
required: true,
|
||||
});
|
||||
readonly token = core.getInput('token', { required: true });
|
||||
|
||||
constructor() {
|
||||
const envRegexInput = getInput('env-regex');
|
||||
const envRegex = envRegexInput ? new RegExp(envRegexInput) : this.options.envRegex;
|
||||
const additionalEnvVarNames = getMultilineInput('additional-env-list');
|
||||
this._environmentVariables = new Map(
|
||||
Object.entries(process.env)
|
||||
.filter(([key]) => envRegex.test(key) || additionalEnvVarNames.includes(key))
|
||||
.filter((pair): pair is [string, string] => pair[1] !== undefined),
|
||||
);
|
||||
for (const name of additionalEnvVarNames) {
|
||||
if (!this._environmentVariables.has(name)) {
|
||||
warning(
|
||||
`Environment variable '${name}' listed in 'additional-env-list' was not found in the parent process environment; it will not be passed to the renovate container.`,
|
||||
);
|
||||
}
|
||||
this.validate();
|
||||
}
|
||||
|
||||
validate(): void {
|
||||
if (this.token === '') {
|
||||
throw new Error('input.token MUST NOT be empty');
|
||||
}
|
||||
|
||||
this.token = this.get(
|
||||
this.options.token.input,
|
||||
this.options.token.env,
|
||||
this.options.token.optional,
|
||||
);
|
||||
this._configurationFile = this.get(
|
||||
this.options.configurationFile.input,
|
||||
this.options.configurationFile.env,
|
||||
this.options.configurationFile.optional,
|
||||
);
|
||||
}
|
||||
|
||||
configurationFile(): EnvironmentVariable | null {
|
||||
if (this._configurationFile.value !== '') {
|
||||
return {
|
||||
key: this._configurationFile.key,
|
||||
value: path.resolve(this._configurationFile.value),
|
||||
};
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
getDockerImage(): string | null {
|
||||
return getInput('renovate-image') || null;
|
||||
}
|
||||
|
||||
getVersion(): string | null {
|
||||
return getInput('renovate-version') || null;
|
||||
}
|
||||
|
||||
mountDockerSocket(): boolean {
|
||||
return getInput('mount-docker-socket') === 'true';
|
||||
}
|
||||
|
||||
dockerSocketHostPath(): string {
|
||||
return getInput('docker-socket-host-path') || '/var/run/docker.sock';
|
||||
}
|
||||
|
||||
getDockerCmdFile(): string | null {
|
||||
const cmdFile = getInput('docker-cmd-file');
|
||||
return !!cmdFile && cmdFile !== '' ? path.resolve(cmdFile) : null;
|
||||
}
|
||||
|
||||
getDockerUser(): string | null {
|
||||
return getInput('docker-user') || null;
|
||||
}
|
||||
|
||||
getDockerVolumeMounts(): string[] {
|
||||
return getInput('docker-volumes')
|
||||
.split(';')
|
||||
.map((v) => v.trim())
|
||||
.filter((v) => !!v);
|
||||
}
|
||||
|
||||
getDockerNetwork(): string {
|
||||
return getInput('docker-network');
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert to environment variables.
|
||||
*
|
||||
* @note The environment variables listed below are filtered out.
|
||||
* - Token, available with the `token` property.
|
||||
* - Configuration file, available with the `configurationFile()` method.
|
||||
*/
|
||||
toEnvironmentVariables(): EnvironmentVariable[] {
|
||||
return [...this._environmentVariables].map(([key, value]) => ({
|
||||
key,
|
||||
value,
|
||||
}));
|
||||
}
|
||||
|
||||
private get(input: string, env: string, optional: boolean): EnvironmentVariable {
|
||||
const fromInput = getInput(input);
|
||||
const fromEnv = this._environmentVariables.get(env);
|
||||
|
||||
if (fromInput === '' && fromEnv === undefined && !optional) {
|
||||
throw new Error(
|
||||
[`'${input}' MUST be passed using its input or the '${env}'`, 'environment variable'].join(
|
||||
' ',
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
this._environmentVariables.delete(env);
|
||||
if (fromInput !== '') {
|
||||
return { key: env, value: fromInput };
|
||||
}
|
||||
return { key: env, value: fromEnv ?? '' };
|
||||
}
|
||||
}
|
||||
|
||||
export default Input;
|
||||
+33
-117
@@ -1,139 +1,55 @@
|
||||
import fs from 'node:fs/promises';
|
||||
import path from 'node:path';
|
||||
import { exec, getExecOutput } from '@actions/exec';
|
||||
import { Docker } from './docker';
|
||||
import { Input } from './input';
|
||||
import Docker from './docker';
|
||||
import { exec } from '@actions/exec';
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
|
||||
export class Renovate {
|
||||
static dockerGroupRegex = /^docker:x:(?<groupId>[1-9][0-9]*):/m;
|
||||
private static readonly userAgentKey = 'RENOVATE_USER_AGENT';
|
||||
private static readonly defaultUserAgent =
|
||||
'Renovate/{{renovateVersion}} (https://github.com/renovatebot/github-action)';
|
||||
class Renovate {
|
||||
private configFileEnv = 'RENOVATE_CONFIG_FILE';
|
||||
private tokenEnv = 'RENOVATE_TOKEN';
|
||||
private configFileMountDir = '/github-action';
|
||||
|
||||
private configFile: string;
|
||||
private docker: Docker;
|
||||
|
||||
constructor(private input: Input) {
|
||||
this.docker = new Docker(input);
|
||||
}
|
||||
constructor(configFile: string, private token: string) {
|
||||
this.configFile = path.resolve(configFile);
|
||||
|
||||
async runDockerContainerForVersion(): Promise<string> {
|
||||
const command = `docker run --env FORCE_COLOR=3 --rm ${this.docker.image()} --version`;
|
||||
this.validateArguments();
|
||||
|
||||
const { exitCode, stdout } = await getExecOutput(command);
|
||||
if (exitCode !== 0) {
|
||||
throw new Error(`'docker run' failed with exit code ${exitCode}.`);
|
||||
}
|
||||
|
||||
return stdout.trim();
|
||||
this.docker = new Docker();
|
||||
}
|
||||
|
||||
async runDockerContainer(): Promise<void> {
|
||||
await this.validateArguments();
|
||||
|
||||
const dockerArguments = this.input
|
||||
.toEnvironmentVariables()
|
||||
.map((e) => `--env ${e.key}`)
|
||||
.concat([`--env ${this.input.token.key}=${this.input.token.value} --env FORCE_COLOR=3`]);
|
||||
|
||||
if (!this.input.toEnvironmentVariables().some((e) => e.key === Renovate.userAgentKey)) {
|
||||
dockerArguments.push(`--env "${Renovate.userAgentKey}=${Renovate.defaultUserAgent}"`);
|
||||
}
|
||||
|
||||
const configurationFile = this.input.configurationFile();
|
||||
if (configurationFile !== null) {
|
||||
const baseName = path.basename(configurationFile.value);
|
||||
const mountPath = path.join(this.configFileMountDir, baseName);
|
||||
dockerArguments.push(
|
||||
`--env ${configurationFile.key}=${mountPath}`,
|
||||
`--volume ${configurationFile.value}:${mountPath}`,
|
||||
);
|
||||
}
|
||||
|
||||
if (this.input.mountDockerSocket()) {
|
||||
const sockPath = this.input.dockerSocketHostPath();
|
||||
const stat = await fs.stat(sockPath);
|
||||
if (!stat.isSocket()) {
|
||||
throw new Error(`docker socket host path '${sockPath}' MUST exist and be a socket`);
|
||||
}
|
||||
|
||||
dockerArguments.push(
|
||||
`--volume ${sockPath}:/var/run/docker.sock`,
|
||||
`--group-add ${await this.getDockerGroupId()}`,
|
||||
);
|
||||
}
|
||||
|
||||
const dockerCmdFile = this.input.getDockerCmdFile();
|
||||
let dockerCmd: string | null = null;
|
||||
if (dockerCmdFile !== null) {
|
||||
const baseName = path.basename(dockerCmdFile);
|
||||
const mountPath = `/${baseName}`;
|
||||
dockerArguments.push(`--volume ${dockerCmdFile}:${mountPath}`);
|
||||
dockerCmd = mountPath;
|
||||
}
|
||||
|
||||
const dockerUser = this.input.getDockerUser();
|
||||
if (dockerUser !== null) {
|
||||
dockerArguments.push(`--user ${dockerUser}`);
|
||||
}
|
||||
|
||||
for (const volumeMount of this.input.getDockerVolumeMounts()) {
|
||||
dockerArguments.push(`--volume ${volumeMount}`);
|
||||
}
|
||||
|
||||
const dockerNetwork = this.input.getDockerNetwork();
|
||||
if (dockerNetwork) {
|
||||
dockerArguments.push(`--network ${dockerNetwork}`);
|
||||
}
|
||||
|
||||
dockerArguments.push('--rm', this.docker.image());
|
||||
|
||||
if (dockerCmd !== null) {
|
||||
dockerArguments.push(dockerCmd);
|
||||
}
|
||||
|
||||
const command = `docker run ${dockerArguments.join(' ')}`;
|
||||
const commandArguments = [
|
||||
'--rm',
|
||||
`--env ${this.configFileEnv}=${this.configFileMountPath()}`,
|
||||
`--env ${this.tokenEnv}=${this.token}`,
|
||||
`--volume ${this.configFile}:${this.configFileMountPath()}`,
|
||||
this.docker.image(),
|
||||
];
|
||||
const command = `docker run ${commandArguments.join(' ')}`;
|
||||
|
||||
const code = await exec(command);
|
||||
if (code !== 0) {
|
||||
throw new Error(`'docker run' failed with exit code ${code}.`);
|
||||
new Error(`'docker run' failed with exit code ${code}.`);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch the host docker group of the GitHub Action runner.
|
||||
*
|
||||
* The Renovate container needs access to this group in order to have the
|
||||
* required permissions on the Docker socket.
|
||||
*/
|
||||
private async getDockerGroupId(): Promise<string> {
|
||||
const groupFile = '/etc/group';
|
||||
const groups = await fs.readFile(groupFile, {
|
||||
encoding: 'utf-8',
|
||||
});
|
||||
|
||||
/**
|
||||
* The group file has `groupname:group-password:GID:username-list` as
|
||||
* structure and we're interested in the `GID` (the group ID).
|
||||
*
|
||||
* Source: https://www.thegeekdiary.com/etcgroup-file-explained/
|
||||
*/
|
||||
const match = Renovate.dockerGroupRegex.exec(groups);
|
||||
if (match?.groups?.groupId === undefined) {
|
||||
throw new Error(`Could not find group docker in ${groupFile}`);
|
||||
private validateArguments(): void {
|
||||
if (!fs.existsSync(this.configFile)) {
|
||||
throw new Error(
|
||||
`Could not locate configuration file '${this.configFile}'.`
|
||||
);
|
||||
}
|
||||
|
||||
return match.groups.groupId;
|
||||
}
|
||||
|
||||
private async validateArguments(): Promise<void> {
|
||||
if (/\s/.test(this.input.token.value)) {
|
||||
throw new Error('Token MUST NOT contain whitespace');
|
||||
}
|
||||
private configFileName(): string {
|
||||
return path.basename(this.configFile);
|
||||
}
|
||||
|
||||
const configurationFile = this.input.configurationFile();
|
||||
if (configurationFile !== null && !(await fs.stat(configurationFile.value)).isFile()) {
|
||||
throw new Error(`configuration file '${configurationFile.value}' MUST be an existing file`);
|
||||
}
|
||||
private configFileMountPath(): string {
|
||||
return path.join(this.configFileMountDir, this.configFileName());
|
||||
}
|
||||
}
|
||||
|
||||
export default Renovate;
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"extends": "../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"sourceMap": false,
|
||||
"declaration": false,
|
||||
"rootDir": ".",
|
||||
"outDir": "dist",
|
||||
"types": ["node"]
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
// https://github.com/evanw/esbuild/issues/1921#issuecomment-1898197331
|
||||
import { createRequire } from 'node:module';
|
||||
import path from 'node:path';
|
||||
import url from 'node:url';
|
||||
|
||||
globalThis.require = createRequire(import.meta.url);
|
||||
globalThis.__filename = url.fileURLToPath(import.meta.url);
|
||||
globalThis.__dirname = path.dirname(__filename);
|
||||
@@ -1,15 +0,0 @@
|
||||
import { env } from 'node:process';
|
||||
import { build } from 'esbuild';
|
||||
|
||||
await build({
|
||||
entryPoints: ['./src/index.ts'],
|
||||
bundle: true,
|
||||
platform: 'node',
|
||||
target: 'node24',
|
||||
minify: !!env.CI,
|
||||
tsconfig: 'tsconfig.dist.json',
|
||||
sourcemap: true,
|
||||
format: 'esm',
|
||||
outdir: './dist/',
|
||||
inject: ['tools/cjs-shim.ts'], // https://github.com/evanw/esbuild/issues/1921#issuecomment-1898197331
|
||||
});
|
||||
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"extends": ["@tsconfig/strictest/tsconfig.json", "@tsconfig/node24/tsconfig.json"],
|
||||
"compilerOptions": {
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"esModuleInterop": true,
|
||||
"noEmit": true
|
||||
}
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"types": ["node"]
|
||||
},
|
||||
"files": ["./src/index.ts"]
|
||||
}
|
||||
+8
-8
@@ -1,13 +1,13 @@
|
||||
{
|
||||
"extends": ["@tsconfig/strictest/tsconfig.json", "@tsconfig/node24/tsconfig.json"],
|
||||
"compilerOptions": {
|
||||
"allowJs": true,
|
||||
"target": "es2020",
|
||||
"module": "commonjs",
|
||||
"moduleResolution": "node",
|
||||
"resolveJsonModule": true,
|
||||
"esModuleInterop": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"outDir": "dist",
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "Bundler",
|
||||
"noImplicitAny": false,
|
||||
"noPropertyAccessFromIndexSignature": false /* makes code more complex */
|
||||
"outDir": "dist"
|
||||
},
|
||||
"exclude": ["node_modules/", "**/__mocks__/*", "dist/", "coverage/", "html/"]
|
||||
"include": ["src/**/*.ts", "bin/**/*.ts"],
|
||||
"exclude": ["node_modules", "**/*.test.ts"]
|
||||
}
|
||||
Reference in new issue
Block a user