Skip to content

Commit

Permalink
chore(ci): refactor GitHub workflows and update repository indexing
Browse files Browse the repository at this point in the history
- Removed the token, path, and ref fields from the checkout step in charts-release.yaml.
- Added a new step to index the helm repo in charts-release.yaml.
- Updated commit message for publishing charts to include updating of repository index in charts-release.yaml.
- Deleted repository-index-push.yaml workflow file.
- Refactored repository-index.yaml to trigger on push events on main branch affecting 'repository/**' paths instead of being called as a workflow.
- Removed unnecessary command to print index.yaml content in repository-index.yaml.
- Changed commit message when updating the repository index in repository-index.yaml.
  • Loading branch information
winromulus committed Jul 6, 2024
1 parent eeff8a9 commit 56945a9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 24 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/charts-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.ES_GITHUB_PAT }}
path: helm-charts
ref: main

- name: helm - package
run: |
Expand All @@ -33,12 +29,17 @@ jobs:
fi
done
- name: helm - repo - index
run: |
helm repo index repository --url "repository"
helm repo index --merge repository/index.yaml .
rm repository/index.yaml
- name: github - publish - charts
run: |
git config user.name "Romeo Dumitrescu"
git config user.email "5931333+winromulus@users.noreply.github.com"
git add .
git status
git commit -m "Published charts"
git commit -m "Published charts and updated repository index"
git push
13 changes: 0 additions & 13 deletions .github/workflows/repository-index-push.yaml

This file was deleted.

13 changes: 7 additions & 6 deletions .github/workflows/repository-index.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
name: repository index

on:
workflow_call:

push:
branches:
- main
paths:
- 'repository/**'

jobs:
index:
runs-on: ubuntu-latest
Expand All @@ -18,17 +22,14 @@ jobs:
helm repo index --merge repository/index.yaml .
rm repository/index.yaml
cat index.yaml
- name: github - publish - index
run: |
git pull
git config user.name "Romeo Dumitrescu"
git config user.email "5931333+winromulus@users.noreply.github.com"
git add .
git status
git commit -m "Repository index updated"
git commit -m "Updated repository index"
git push

0 comments on commit 56945a9

Please sign in to comment.