Skip to content

Commit

Permalink
insert variable struct
Browse files Browse the repository at this point in the history
  • Loading branch information
ReinerSchinkoethe committed Jan 27, 2025
1 parent 4fadd0f commit 0d54e0d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/renovate-manuall.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ on:
jobs:
manually-renovate-call:
uses: simatic-ax/renovate-config/.github/workflows/reusable-renovate-workflow.yml
with:
renovate_reposetory_filter: "simatic-ax/ae-hw-engineering" #"simatic-ax/*"
14 changes: 13 additions & 1 deletion .github/workflows/reusable-renovate-workflow.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
name: reusable-renovate-workflow

workflow_call:
Input:
renovate_reposetory_filter:
description:
"This fills the setting autodiscoverFilter of renovate. The name of the reprosetory from which the job was called should be written here, according to the scheme 'simatic-ax/reprosetory_name'"
required: true

jobs:
renovate:
runs-on: ubuntu-24.04
Expand All @@ -24,10 +31,15 @@ jobs:
curl -H "Authorization: Bearer $APAX_TOKEN" "https://api.simatic-ax.siemens.io/apax/login?format=npmrc" -o .npmrc
# Store the npmrc file in the RENOVATE_NPMRC variable so that it can be used in the next step:
{
echo 'RENOVATE_NPMRC<<EOF'
echo 'RENOVATE_NPMRC<<renovate_reposetory_filter'
} >> "$GITHUB_ENV"
# Store the value of '' in globale variable RENOVATE_AUTODISCOVERFILTER, that is used in renovate-global-config.js om next step:
{
echo 'RENOVATE_AUTODISCOVERFILTER<<EOF'
cat .npmrc
echo EOF
} >> "$GITHUB_ENV"
# Store the
# Mask the contents of the npmrc file so that they don't appear in job logs:
while read -r line;
do
Expand Down
3 changes: 1 addition & 2 deletions Global-Config/renovate-global-config.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
const apaxNpmrc = process.env.RENOVATE_NPMRC;

const prFooter = `:space_invader: :sparkles: This merge request is proudly presented by [Renovate Bot](https://code.siemens.com/ax/devops/renovate-bot).`;
const autodiscoverFilter = "simatic-ax/*";
module.exports = {
platform: "github",
groupName: "all",
separateMajorMinor: false,
gitAuthor: "simatic-ax-bot <[email protected]>",
prFooter: prFooter,
requireConfig: "required",
autodiscoverFilter: autodiscoverFilter,
autodiscoverFilter: process.env.RENOVATE_AUTODISCOVERFILTER, //
autodiscover: true,
allowPostUpgradeCommandTemplating: true,
allowedPostUpgradeCommands: [".+"],
Expand Down

0 comments on commit 0d54e0d

Please sign in to comment.