Skip to content

Commit

Permalink
Test/branch (#37)
Browse files Browse the repository at this point in the history
* fix: syntax

* add dev workflow

* fix versioning
  • Loading branch information
JTaeuber authored Oct 21, 2024
1 parent 9c3bd00 commit ddb93cb
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/create_dev_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,19 @@ jobs:
contents: write

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Extract Chart Version
id: chart_version
run: |
version=$(yq e '.version' ./test-chart/Chart.yaml)
echo "version=$version" >> $GITHUB_ENV
- name: Dispatch event to create dev build
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
repository: JTaeuber/test-chart
event-type: create-dev-build
client-payload: '{"version": "dev"}'
client-payload: '{"version": "${{ env.version }}-dev"}'
13 changes: 13 additions & 0 deletions .github/workflows/helm_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
MTR: mtr.devops.telekom.de

- name: Helm Lint, Package, and Push
if: github.event.action == 'release-new-version'
run: |
cd test-chart
helm lint .
Expand All @@ -36,6 +37,18 @@ jobs:
MTR: mtr.devops.telekom.de
REPO: ${{ secrets.REPO }}

- name: Helm Lint, Package, and Push
if: github.event.action == 'create-dev-build'
run: |
cd test-chart
helm lint .
helm package . --version ${{ github.event.client_payload.version }} --app-version dev
helm push $(ls *.tgz | head -1) oci://ghcr.io/jtaeuber/charts
helm push $(ls *.tgz | head -1) oci://${MTR}/${REPO}/charts
env:
MTR: mtr.devops.telekom.de
REPO: ${{ secrets.REPO }}

- name: Dispatch Event to Helm-Charts Repo
uses: peter-evans/repository-dispatch@v3
with:
Expand Down

0 comments on commit ddb93cb

Please sign in to comment.