-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
workflow renovate-sanity-check: extrude
- Loading branch information
1 parent
918bd26
commit fcd74b0
Showing
3 changed files
with
54 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
module.exports = async ({ github, context, inputs, actionPath, core, debug = false }) => { | ||
console.log(`${actionPath}/src/renovateSanityCheck.js`) | ||
const { default: renovateSanityCheck } = await import(`${actionPath}/src/renovateSanityCheck.js`) | ||
const { default: sendSlackMessage } = await import(`${actionPath}/src/sendSlackMessage.js`) | ||
|
||
const message = await renovateSanityCheck({ | ||
org: context.repo.owner, | ||
github, | ||
debug | ||
}) | ||
|
||
if (message.length > 0) { await sendSlackMessage({ debug, username: 'renovate-sanity-check', message: `[renovate-sanity-check] ${message}`, color: 'yellow', channel: '#security-action', token: inputs.slack_token }) } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# action that runs monthly and check if all repositories in the organization are following the renovate central configuration | ||
# to all repositories in this organization | ||
name: renovate-sanity-check | ||
description: Renovate Sanity Check | ||
inputs: | ||
github_token: | ||
description: 'GitHub token' | ||
required: true | ||
slack_token: | ||
description: 'Slack token' | ||
required: true | ||
debug: | ||
description: 'Debug mode' | ||
default: "false" | ||
runs: | ||
using: 'composite' | ||
steps: | ||
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 | ||
with: | ||
node-version: '20.x' | ||
- id: npm | ||
run: cd ${{ github.action_path }}/../..; npm ci | ||
shell: bash | ||
- name: run | ||
id: run | ||
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 | ||
env: | ||
DEBUG: ${{ (inputs.debug == 'true' || runner.debug) && 'true' || 'false'}} | ||
with: | ||
github-token: ${{ inputs.github_token }} | ||
script: | | ||
const actionPath = '${{ github.action_path }}/../../' | ||
const inputs = ${{ toJson(inputs) }} | ||
const script = require('${{ github.action_path }}/action.cjs') | ||
await script({github, context, inputs, actionPath, core, | ||
debug: process.env.DEBUG === 'true'}) |