Skip to content

Commit

Permalink
chore: fix release when no artifacts
Browse files Browse the repository at this point in the history
Signed-off-by: Ludovic Ortega <[email protected]>
  • Loading branch information
M0NsTeRRR committed Nov 24, 2024
1 parent 29572e1 commit 2f9cacc
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 39 deletions.
67 changes: 28 additions & 39 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -1,50 +1,39 @@
{
$schema: 'https://docs.renovatebot.com/renovate-schema.json',
extends: [
'config:recommended',
':dependencyDashboard',
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:recommended",
"docker:enableMajor",
"replacements:k8s-registry-move",
":automergePr",
":automergePatch",
":disableRateLimiting",
":dependencyDashboard",
":semanticCommits",
":timezone(Europe/Paris)",
"github>m0nsterrr/helm-charts//.github/renovate/labels.json5",
],
dependencyDashboardAutoclose: true,
automergeType: 'pr',
platformAutomerge: true,
rebaseWhen: 'conflicted',
timezone: 'Europe/Paris',
schedule: [
'before 9pm on friday',
],
prConcurrentLimit: 0,
prHourlyLimit: 0,
terragrunt: {
enabled: false,
"lockFileMaintenance": {
"enabled": true,
},
labels: [
'dependencies',
"dependencyDashboardTitle": "Renovate Dashboard 🤖",
"suppressNotifications": ["prEditedNotification", "prIgnoreNotification"],
"rebaseWhen": "conflicted",
"schedule": [
"before 9pm on friday",
],
vulnerabilityAlerts: {
enabled: true,
labels: [
'security',
],
},
patch: {
automerge: true,
},
pin: {
automerge: true,
},
'pre-commit': {
enabled: true,
},
customManagers: [
"labels": [
"dependencies",
],
"customManagers": [
{
customType: 'regex',
fileMatch: [
'(^|/)Chart\\.yaml$',
"customType": "regex",
"fileMatch": [
"(^|/)Chart\\.yaml$",
],
matchStrings: [
"matchStrings": [
'#\\s+image:\\s+(?<depName>\\S*)\nappVersion:\\s+"(?<currentValue>\\S*)"',
],
datasourceTemplate: 'docker',
"datasourceTemplate": "docker",
},
],
}
25 changes: 25 additions & 0 deletions .github/renovate/labels.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"packageRules": [
{
"matchDatasources": ["helm"],
"addLabels": ["renovate/helm"]
},
{
"matchUpdateTypes": ["major"],
"labels": ["type/major"]
},
{
"matchUpdateTypes": ["minor"],
"labels": ["type/minor"]
},
{
"matchUpdateTypes": ["patch"],
"labels": ["type/patch"]
},
{
"matchUpdateTypes": ["digest"],
"labels": ["type/digest"]
},
]
}
12 changes: 12 additions & 0 deletions .github/workflows/releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ jobs:
permissions:
contents: write
packages: write
outputs:
has_artifacts: ${{ steps.check-artifacts.outputs.has_artifacts }}
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -25,8 +27,17 @@ jobs:
config: "./cr.yaml"
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- name: Check if artifacts exist
id: check-artifacts
run: |
if ls .cr-release-packages/* >/dev/null 2>&1; then
echo "has_artifacts=true" >> $GITHUB_OUTPUT
else
echo "has_artifacts=false" >> $GITHUB_OUTPUT
fi
- name: Upload artifacts
uses: actions/upload-artifact@v4
if: steps.check-artifacts.outputs.has_artifacts == 'true'
with:
name: artifacts
path: .cr-release-packages/
Expand All @@ -38,6 +49,7 @@ jobs:
packages: write # needed for pushing to github registry
id-token: write # needed for signing the images with GitHub OIDC Token
needs: [publish-gh-pages]
if: needs.publish-gh-pages.outputs.has_artifacts == 'true'
steps:
- name: Install Cosign
uses: sigstore/cosign-installer@v3
Expand Down

0 comments on commit 2f9cacc

Please sign in to comment.