ci: Cleanup obsolete files

This commit is contained in:
Bernd Schorgers 2025-02-12 17:11:22 +01:00
parent 77ab223e7e
commit ed1fc273b2
No known key found for this signature in database
GPG key ID: BC5E2BD907F9A8EC
5 changed files with 3 additions and 139 deletions

View file

@ -1,5 +1,5 @@
--- ---
name: "Chart: Release" name: "Release chart (Reusable)"
on: on:
workflow_call: workflow_call:

View file

@ -1,4 +1,4 @@
name: "Charts: Lint" name: "Charts: Lint (Reusable)"
on: on:
workflow_call: workflow_call:

View file

@ -1,4 +1,4 @@
name: "Charts: Test" name: "Charts: Test (Reusable)"
on: on:
workflow_call: workflow_call:

View file

@ -1,82 +0,0 @@
name: "Pull Request: Get metadata"
on:
workflow_call:
outputs:
isRenovatePR:
description: "Is the PR coming from Renovate?"
value: ${{ jobs.pr-metadata.outputs.isRenovatePR }}
isFork:
description: "Is the PR coming from a forked repo?"
value: ${{ jobs.pr-metadata.outputs.isFork }}
addedOrModifiedFilesDetected:
description: "Does the PR contain any changes?"
value: ${{ jobs.pr-changes.outputs.addedOrModifiedFilesDetected }}
addedOrModifiedFiles:
description: "A list of the files changed in this PR"
value: ${{ jobs.pr-changes.outputs.addedOrModifiedFiles }}
addedOrModifiedCharts:
description: "A list of the charts changed in this PR"
value: ${{ jobs.pr-changes.outputs.addedOrModifiedCharts }}
chartsToLint:
value: ${{ jobs.pr-changes.outputs.chartsToLint }}
chartsToInstall:
value: ${{ jobs.pr-changes.outputs.chartsToInstall }}
commonLibraryUpdated:
value: ${{ jobs.pr-changes.outputs.commonLibraryUpdated }}
jobs:
pr-metadata:
name: Collect PR metadata
runs-on: ubuntu-22.04
outputs:
isRenovatePR: ${{ startsWith(steps.branch-name.outputs.current_branch, 'renovate/') }}
isFork: ${{ github.event.pull_request.head.repo.full_name != github.repository }}
steps:
- name: Get branch name
id: branch-name
uses: tj-actions/branch-names@v6.5
- name: Save PR data to file
env:
PR_NUMBER: ${{ github.event.number }}
run: |
echo $PR_NUMBER > pr_number.txt
- name: Store pr data in artifact
uses: actions/upload-artifact@v4
with:
name: pr_metadata
path: ./pr_number.txt
retention-days: 5
pr-changes:
name: Collect PR changes
runs-on: ubuntu-22.04
outputs:
addedOrModifiedFilesDetected: ${{ steps.changed-files.outputs.allAddedOrModified }}
addedOrModifiedFiles: ${{ steps.changed-files.outputs.allAddedOrModified_files }}
addedOrModifiedCharts: ${{ steps.changed-charts.outputs.charts }}
addedOrModifiedLibraryCharts: ${{ steps.changed-charts.outputs.chartsLibrary }}
addedOrModifiedApplicationCharts: ${{ steps.changed-charts.outputs.chartsApplication }}
chartsToLint: ${{ steps.changed-charts.outputs.chartsToLint }}
chartsToInstall: ${{ steps.changed-charts.outputs.chartsToInstall }}
commonLibraryUpdated: ${{ contains(fromJSON(steps.changed-charts.outputs.charts), 'library/common') }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Collect changed files
uses: dorny/paths-filter@v3
id: changed-files
with:
list-files: json
filters: |
allAddedOrModified:
- added|modified: '**'
- name: Collect changed charts
uses: bjw-s/helm-charts-actions/collect-charts@main
id: changed-charts

View file

@ -1,54 +0,0 @@
name: "Charts: Create git tag"
on:
workflow_call:
inputs:
charts:
description: >
Json encoded list of Helm charts to release.
Defaults to releasing everything.
default: "[]"
required: false
type: string
secrets:
BJWS_APP_ID:
required: true
BJWS_APP_PRIVATE_KEY:
required: true
env:
CHARTS_SRC_DIR: "charts"
jobs:
tag-charts:
name: Tag charts
runs-on: ubuntu-22.04
steps:
- name: "Generate Short Lived OAuth App Token (ghs_*)"
uses: actions/create-github-app-token@v1.10.4
id: app-token
with:
app-id: "${{ secrets.BJWS_APP_ID }}"
private-key: "${{ secrets.BJWS_APP_PRIVATE_KEY }}"
- name: Checkout chart sources
uses: actions/checkout@v4
with:
token: ${{ steps.app-token.outputs.token }}
fetch-depth: 0
- name: Create git tag for charts
shell: bash
run: |
CHARTS=( $(yq --null-input e '${{ inputs.charts }}[]' ) )
for CHART in "${CHARTS[@]}" ; do
mapfile -t CHART_PATH_PARTS < <(echo "$CHART" | tr '/' '\n')
CHART_TYPE=${CHART_PATH_PARTS[0]}
CHART_NAME=${CHART_PATH_PARTS[1]}
CHART_VERSION=$(yq e '.version' ${{ env.CHARTS_SRC_DIR }}/${CHART}/Chart.yaml)
git tag --force "${CHART_NAME}-${CHART_VERSION}"
done
git push --tags --force