mirror of
https://github.com/renovatebot/github-action.git
synced 2025-12-19 11:27:08 +00:00
Compare commits
50 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
65f8b67f77 | ||
|
|
b62f4566b0 | ||
|
|
f21124b7a9 | ||
|
|
a9fddb173a | ||
|
|
d0258c833a | ||
|
|
cca0b86702 | ||
|
|
d400a8c4eb | ||
|
|
5045dec906 | ||
|
|
53379d5ef5 | ||
|
|
eed36ceef6 | ||
|
|
7359cca382 | ||
|
|
b4fc770ace | ||
|
|
54ccfe8c99 | ||
|
|
3fb872de61 | ||
|
|
7f353c27aa | ||
|
|
548f050250 | ||
|
|
a05a7732a1 | ||
|
|
d21ed0efec | ||
|
|
efc82a710f | ||
|
|
e571d85ac0 | ||
|
|
635cf78cf0 | ||
|
|
95fbfab63b | ||
|
|
07847d1ce3 | ||
|
|
395475ba39 | ||
|
|
35e2653320 | ||
|
|
094e9c6953 | ||
|
|
dabc2a05a3 | ||
|
|
9b96e25a5a | ||
|
|
c778357a67 | ||
|
|
4728f99879 | ||
|
|
5fde7be597 | ||
|
|
f5951c521b | ||
|
|
2fb813ee7f | ||
|
|
fde0305037 | ||
|
|
47283fac74 | ||
|
|
ccbe4e599c | ||
|
|
5601672bb1 | ||
|
|
5ccdc9c834 | ||
|
|
877f1edb5a | ||
|
|
a7d997abb9 | ||
|
|
a163433138 | ||
|
|
80916137e7 | ||
|
|
27c17575a9 | ||
|
|
c3a7384543 | ||
|
|
c31dec6b59 | ||
|
|
61dcbbd7bc | ||
|
|
92e7f7b274 | ||
|
|
9c94e7fd2b | ||
|
|
f90da8d8bc | ||
|
|
1adf39f4f8 |
9 changed files with 375 additions and 273 deletions
4
.github/actions/setup-node/action.yml
vendored
4
.github/actions/setup-node/action.yml
vendored
|
|
@ -18,7 +18,7 @@ runs:
|
||||||
}}' >> "$GITHUB_ENV"
|
}}' >> "$GITHUB_ENV"
|
||||||
|
|
||||||
- name: ♻️ Restore `node_modules`
|
- name: ♻️ Restore `node_modules`
|
||||||
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
|
uses: actions/cache/restore@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
|
||||||
id: node-modules-restore
|
id: node-modules-restore
|
||||||
with:
|
with:
|
||||||
path: node_modules
|
path: node_modules
|
||||||
|
|
@ -53,7 +53,7 @@ runs:
|
||||||
|
|
||||||
- name: ♻️ Write `node_modules` cache
|
- name: ♻️ Write `node_modules` cache
|
||||||
if: inputs.save-cache == 'true' && env.CACHE_HIT != 'true'
|
if: inputs.save-cache == 'true' && env.CACHE_HIT != 'true'
|
||||||
uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
|
uses: actions/cache/save@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
|
||||||
with:
|
with:
|
||||||
path: node_modules
|
path: node_modules
|
||||||
key: ${{ env.CACHE_KEY }}
|
key: ${{ env.CACHE_KEY }}
|
||||||
|
|
|
||||||
31
.github/workflows/build.yml
vendored
31
.github/workflows/build.yml
vendored
|
|
@ -10,7 +10,7 @@ concurrency:
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
env:
|
env:
|
||||||
RENOVATE_VERSION: 42.50.0 # renovate: datasource=docker depName=renovate packageName=ghcr.io/renovatebot/renovate
|
RENOVATE_VERSION: 42.64.1 # renovate: datasource=docker depName=renovate packageName=ghcr.io/renovatebot/renovate
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
prepare:
|
prepare:
|
||||||
|
|
@ -18,7 +18,7 @@ jobs:
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
|
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
||||||
with:
|
with:
|
||||||
show-progress: false
|
show-progress: false
|
||||||
|
|
||||||
|
|
@ -33,7 +33,7 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
|
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
show-progress: false
|
show-progress: false
|
||||||
|
|
@ -51,7 +51,7 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
|
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
||||||
with:
|
with:
|
||||||
show-progress: false
|
show-progress: false
|
||||||
|
|
||||||
|
|
@ -75,7 +75,7 @@ jobs:
|
||||||
- example/renovate-config.json
|
- example/renovate-config.json
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
|
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
||||||
with:
|
with:
|
||||||
show-progress: false
|
show-progress: false
|
||||||
|
|
||||||
|
|
@ -113,11 +113,30 @@ jobs:
|
||||||
docker-cmd-file: example/entrypoint.sh
|
docker-cmd-file: example/entrypoint.sh
|
||||||
docker-user: root
|
docker-user: root
|
||||||
|
|
||||||
|
renovate-config-validator:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 10
|
||||||
|
container:
|
||||||
|
image: ghcr.io/renovatebot/renovate:42.64.1@sha256:e09f71019881fff15f397560d979736c6c6fd712f790fdb0a75697a324ee965a
|
||||||
|
# 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@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
||||||
|
with:
|
||||||
|
show-progress: false
|
||||||
|
|
||||||
|
- name: Validate Renovate configuration
|
||||||
|
working-directory: example
|
||||||
|
run: |
|
||||||
|
renovate-config-validator renovate-config.js renovate-config.json
|
||||||
|
|
||||||
release:
|
release:
|
||||||
needs:
|
needs:
|
||||||
- lint
|
- lint
|
||||||
- commitlint
|
- commitlint
|
||||||
- e2e
|
- e2e
|
||||||
|
- renovate-config-validator
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Setup Git user
|
- name: Setup Git user
|
||||||
|
|
@ -129,7 +148,7 @@ jobs:
|
||||||
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
|
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0 # required for semantic release
|
fetch-depth: 0 # required for semantic release
|
||||||
ref: 'release'
|
ref: 'release'
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
20.19.6
|
24.12.0
|
||||||
|
|
|
||||||
54
README.md
54
README.md
|
|
@ -98,9 +98,9 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v5.0.1
|
uses: actions/checkout@v6.0.1
|
||||||
- name: Self-hosted Renovate
|
- name: Self-hosted Renovate
|
||||||
uses: renovatebot/github-action@v44.0.5
|
uses: renovatebot/github-action@v44.1.0
|
||||||
with:
|
with:
|
||||||
docker-cmd-file: .github/renovate-entrypoint.sh
|
docker-cmd-file: .github/renovate-entrypoint.sh
|
||||||
docker-user: root
|
docker-user: root
|
||||||
|
|
@ -141,9 +141,9 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v5.0.1
|
uses: actions/checkout@v6.0.1
|
||||||
- name: Self-hosted Renovate
|
- name: Self-hosted Renovate
|
||||||
uses: renovatebot/github-action@v44.0.5
|
uses: renovatebot/github-action@v44.1.0
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.RENOVATE_TOKEN }}
|
token: ${{ secrets.RENOVATE_TOKEN }}
|
||||||
docker-volumes: |
|
docker-volumes: |
|
||||||
|
|
@ -192,9 +192,9 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v5.0.1
|
uses: actions/checkout@v6.0.1
|
||||||
- name: Self-hosted Renovate
|
- name: Self-hosted Renovate
|
||||||
uses: renovatebot/github-action@v44.0.5
|
uses: renovatebot/github-action@v44.1.0
|
||||||
with:
|
with:
|
||||||
renovate-image: myproxyhub.domain.com/renovate/renovate
|
renovate-image: myproxyhub.domain.com/renovate/renovate
|
||||||
token: ${{ secrets.RENOVATE_TOKEN }}
|
token: ${{ secrets.RENOVATE_TOKEN }}
|
||||||
|
|
@ -209,9 +209,9 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v5.0.1
|
uses: actions/checkout@v6.0.1
|
||||||
- name: Self-hosted Renovate
|
- name: Self-hosted Renovate
|
||||||
uses: renovatebot/github-action@v44.0.5
|
uses: renovatebot/github-action@v44.1.0
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.RENOVATE_TOKEN }}
|
token: ${{ secrets.RENOVATE_TOKEN }}
|
||||||
```
|
```
|
||||||
|
|
@ -222,7 +222,7 @@ The Renovate version to use.
|
||||||
If omitted the action will use the [`default version`](./action.yml#L28) Docker tag.
|
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).
|
Check [the available tags on Docker Hub](https://hub.docker.com/r/renovate/renovate/tags).
|
||||||
|
|
||||||
This sample will use `ghcr.io/renovatebot/renovate:42.39.2` image.
|
This sample will use `ghcr.io/renovatebot/renovate:42.52.8` image.
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
....
|
....
|
||||||
|
|
@ -231,11 +231,11 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v5.0.1
|
uses: actions/checkout@v6.0.1
|
||||||
- name: Self-hosted Renovate
|
- name: Self-hosted Renovate
|
||||||
uses: renovatebot/github-action@v44.0.5
|
uses: renovatebot/github-action@v44.1.0
|
||||||
with:
|
with:
|
||||||
renovate-version: 42.39.2
|
renovate-version: 42.52.8
|
||||||
token: ${{ secrets.RENOVATE_TOKEN }}
|
token: ${{ secrets.RENOVATE_TOKEN }}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
@ -248,9 +248,9 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v5.0.1
|
uses: actions/checkout@v6.0.1
|
||||||
- name: Self-hosted Renovate
|
- name: Self-hosted Renovate
|
||||||
uses: renovatebot/github-action@v44.0.5
|
uses: renovatebot/github-action@v44.1.0
|
||||||
with:
|
with:
|
||||||
renovate-version: full
|
renovate-version: full
|
||||||
token: ${{ secrets.RENOVATE_TOKEN }}
|
token: ${{ secrets.RENOVATE_TOKEN }}
|
||||||
|
|
@ -283,9 +283,9 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v5.0.1
|
uses: actions/checkout@v6.0.1
|
||||||
- name: Self-hosted Renovate
|
- name: Self-hosted Renovate
|
||||||
uses: renovatebot/github-action@v44.0.5
|
uses: renovatebot/github-action@v44.1.0
|
||||||
with:
|
with:
|
||||||
configurationFile: example/renovate-config.js
|
configurationFile: example/renovate-config.js
|
||||||
token: ${{ secrets.RENOVATE_TOKEN }}
|
token: ${{ secrets.RENOVATE_TOKEN }}
|
||||||
|
|
@ -298,7 +298,7 @@ If you want to use the Renovate Action on a GitHub Enterprise instance you have
|
||||||
```yml
|
```yml
|
||||||
....
|
....
|
||||||
- name: Self-hosted Renovate
|
- name: Self-hosted Renovate
|
||||||
uses: renovatebot/github-action@v44.0.5
|
uses: renovatebot/github-action@v44.1.0
|
||||||
with:
|
with:
|
||||||
configurationFile: example/renovate-config.js
|
configurationFile: example/renovate-config.js
|
||||||
token: ${{ secrets.RENOVATE_TOKEN }}
|
token: ${{ secrets.RENOVATE_TOKEN }}
|
||||||
|
|
@ -342,10 +342,10 @@ jobs:
|
||||||
repositories: 'repo1,repo2'
|
repositories: 'repo1,repo2'
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v5.0.1
|
uses: actions/checkout@v6.0.1
|
||||||
|
|
||||||
- name: Self-hosted Renovate
|
- name: Self-hosted Renovate
|
||||||
uses: renovatebot/github-action@v44.0.5
|
uses: renovatebot/github-action@v44.1.0
|
||||||
with:
|
with:
|
||||||
configurationFile: example/renovate-config.js
|
configurationFile: example/renovate-config.js
|
||||||
token: '${{ steps.get_token.outputs.token }}'
|
token: '${{ steps.get_token.outputs.token }}'
|
||||||
|
|
@ -360,7 +360,7 @@ For example:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Self-hosted Renovate
|
- name: Self-hosted Renovate
|
||||||
uses: renovatebot/github-action@v44.0.5
|
uses: renovatebot/github-action@v44.1.0
|
||||||
with:
|
with:
|
||||||
token: '${{ steps.get_token.outputs.token }}'
|
token: '${{ steps.get_token.outputs.token }}'
|
||||||
env:
|
env:
|
||||||
|
|
@ -382,9 +382,9 @@ For example if you wish to pass through some credentials for a [host rule](https
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v5.0.1
|
uses: actions/checkout@v6.0.1
|
||||||
- name: Self-hosted Renovate
|
- name: Self-hosted Renovate
|
||||||
uses: renovatebot/github-action@v44.0.5
|
uses: renovatebot/github-action@v44.1.0
|
||||||
with:
|
with:
|
||||||
configurationFile: example/renovate-config.js
|
configurationFile: example/renovate-config.js
|
||||||
token: ${{ secrets.RENOVATE_TOKEN }}
|
token: ${{ secrets.RENOVATE_TOKEN }}
|
||||||
|
|
@ -419,9 +419,9 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v5.0.1
|
uses: actions/checkout@v6.0.1
|
||||||
- name: Self-hosted Renovate
|
- name: Self-hosted Renovate
|
||||||
uses: renovatebot/github-action@v44.0.5
|
uses: renovatebot/github-action@v44.1.0
|
||||||
with:
|
with:
|
||||||
configurationFile: example/renovate-config.js
|
configurationFile: example/renovate-config.js
|
||||||
token: ${{ secrets.RENOVATE_TOKEN }}
|
token: ${{ secrets.RENOVATE_TOKEN }}
|
||||||
|
|
@ -512,11 +512,11 @@ jobs:
|
||||||
sudo chown -R 12021:0 /tmp/renovate/
|
sudo chown -R 12021:0 /tmp/renovate/
|
||||||
ls -R $cache_dir
|
ls -R $cache_dir
|
||||||
|
|
||||||
- uses: renovatebot/github-action@v44.0.5
|
- uses: renovatebot/github-action@v44.1.0
|
||||||
with:
|
with:
|
||||||
configurationFile: renovate.json5
|
configurationFile: renovate.json5
|
||||||
token: ${{ secrets.RENOVATE_TOKEN }}
|
token: ${{ secrets.RENOVATE_TOKEN }}
|
||||||
renovate-version: 42.39.2
|
renovate-version: 42.52.8
|
||||||
env:
|
env:
|
||||||
# This enables the cache -- if this is set, it's not necessary to add it to renovate.json.
|
# 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' }}
|
RENOVATE_REPOSITORY_CACHE: ${{ github.event.inputs.repoCache || 'enabled' }}
|
||||||
|
|
@ -550,7 +550,7 @@ To enable debug logging, add the environment variable `LOG_LEVEL: 'debug'` to th
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
- name: Self-hosted Renovate
|
- name: Self-hosted Renovate
|
||||||
uses: renovatebot/github-action@v44.0.5
|
uses: renovatebot/github-action@v44.1.0
|
||||||
with:
|
with:
|
||||||
configurationFile: example/renovate-config.js
|
configurationFile: example/renovate-config.js
|
||||||
token: ${{ secrets.RENOVATE_TOKEN }}
|
token: ${{ secrets.RENOVATE_TOKEN }}
|
||||||
|
|
|
||||||
3
example/package.json
Normal file
3
example/package.json
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"type": "commonjs"
|
||||||
|
}
|
||||||
18
package.json
18
package.json
|
|
@ -37,16 +37,16 @@
|
||||||
"@actions/exec": "1.1.1"
|
"@actions/exec": "1.1.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@commitlint/cli": "19.8.1",
|
"@commitlint/cli": "20.2.0",
|
||||||
"@commitlint/config-conventional": "19.8.1",
|
"@commitlint/config-conventional": "20.2.0",
|
||||||
"@eslint/js": "9.39.1",
|
"@eslint/js": "9.39.1",
|
||||||
"@semantic-release/git": "10.0.1",
|
"@semantic-release/git": "10.0.1",
|
||||||
"@semantic-release/github": "11.0.6",
|
"@semantic-release/github": "12.0.2",
|
||||||
"@semantic-release/npm": "12.0.2",
|
"@semantic-release/npm": "13.1.2",
|
||||||
"@tsconfig/node20": "20.1.8",
|
"@tsconfig/node20": "20.1.8",
|
||||||
"@tsconfig/strictest": "2.0.6",
|
"@tsconfig/strictest": "2.0.6",
|
||||||
"@types/eslint-config-prettier": "6.11.3",
|
"@types/eslint-config-prettier": "6.11.3",
|
||||||
"@types/node": "20.19.25",
|
"@types/node": "20.19.26",
|
||||||
"conventional-changelog-conventionalcommits": "9.1.0",
|
"conventional-changelog-conventionalcommits": "9.1.0",
|
||||||
"esbuild": "0.27.1",
|
"esbuild": "0.27.1",
|
||||||
"eslint": "9.39.1",
|
"eslint": "9.39.1",
|
||||||
|
|
@ -59,13 +59,13 @@
|
||||||
"prettier": "3.7.4",
|
"prettier": "3.7.4",
|
||||||
"prettier-plugin-packagejson": "2.5.20",
|
"prettier-plugin-packagejson": "2.5.20",
|
||||||
"rimraf": "6.1.2",
|
"rimraf": "6.1.2",
|
||||||
"semantic-release": "24.2.9",
|
"semantic-release": "25.0.2",
|
||||||
"typescript": "5.9.3",
|
"typescript": "5.9.3",
|
||||||
"typescript-eslint": "8.48.1"
|
"typescript-eslint": "8.49.0"
|
||||||
},
|
},
|
||||||
"packageManager": "pnpm@10.24.0",
|
"packageManager": "pnpm@10.25.0",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^20.9.0 || ^22.11.0",
|
"node": "^20.9.0 || ^22.11.0 || ^24.11.0",
|
||||||
"pnpm": "^10.0.0"
|
"pnpm": "^10.0.0"
|
||||||
},
|
},
|
||||||
"pnpm": {
|
"pnpm": {
|
||||||
|
|
|
||||||
516
pnpm-lock.yaml
generated
516
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load diff
|
|
@ -1,12 +1,17 @@
|
||||||
|
import { group, notice, setFailed } from '@actions/core';
|
||||||
import { Input } from './input';
|
import { Input } from './input';
|
||||||
import { Renovate } from './renovate';
|
import { Renovate } from './renovate';
|
||||||
import { setFailed } from '@actions/core';
|
|
||||||
|
|
||||||
async function run(): Promise<void> {
|
async function run(): Promise<void> {
|
||||||
try {
|
try {
|
||||||
const input = new Input();
|
const input = new Input();
|
||||||
const renovate = new Renovate(input);
|
const renovate = new Renovate(input);
|
||||||
|
|
||||||
|
await group('Check Renovate version', async () => {
|
||||||
|
const version = await renovate.runDockerContainerForVersion();
|
||||||
|
notice(version, { title: 'Renovate CLI version' });
|
||||||
|
});
|
||||||
|
|
||||||
await renovate.runDockerContainer();
|
await renovate.runDockerContainer();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
|
import { exec, getExecOutput } from '@actions/exec';
|
||||||
import { Docker } from './docker';
|
import { Docker } from './docker';
|
||||||
import { Input } from './input';
|
import { Input } from './input';
|
||||||
import { exec } from '@actions/exec';
|
|
||||||
import fs from 'node:fs/promises';
|
import fs from 'node:fs/promises';
|
||||||
import path from 'node:path';
|
import path from 'node:path';
|
||||||
|
|
||||||
|
|
@ -14,6 +14,17 @@ export class Renovate {
|
||||||
this.docker = new Docker(input);
|
this.docker = new Docker(input);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async runDockerContainerForVersion(): Promise<string> {
|
||||||
|
const command = `docker run -t --rm ${this.docker.image()} --version`;
|
||||||
|
|
||||||
|
const { exitCode, stdout } = await getExecOutput(command);
|
||||||
|
if (exitCode !== 0) {
|
||||||
|
new Error(`'docker run' failed with exit code ${exitCode}.`);
|
||||||
|
}
|
||||||
|
|
||||||
|
return stdout.trim();
|
||||||
|
}
|
||||||
|
|
||||||
async runDockerContainer(): Promise<void> {
|
async runDockerContainer(): Promise<void> {
|
||||||
await this.validateArguments();
|
await this.validateArguments();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue