Skip to content

Commit

Permalink
Fix workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeriHermans committed Dec 13, 2023
1 parent 577b8e8 commit 4c40ed2
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
- name: 'Configure & Install Helm'
uses: azure/setup-helm@v3

- name: 'Authorize Helm with remote container registry''
- name: 'Authorize Helm with remote container registry'
run: |
echo "TODO"
Expand Down
34 changes: 12 additions & 22 deletions .github/workflows/push.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Release Helm Chart
name: Release Helm Charts
run-name: ${{ github.actor }} is updating the Helm repository

on:
workflow_dispatch:
Expand All @@ -15,45 +16,34 @@ on:

jobs:
release:
runs-on:
group: k8s-runners
runs-on: ubuntu-latest

steps:
# 1. Checkout the current Git repository.

- name: 'Git Checkout'
uses: actions/checkout@v3
with:
fetch-depth: 0

# 2. Configure Helm

- name: 'Configure & Install Helm'
uses: azure/setup-helm@v3

# 3. Authorize Helm with Nexus
- name: 'Authorize Helm with Nexus'
run: |
echo ${{ secrets.NEXUS_PASSWORD}} | helm registry login -u ${{ secrets.NEXUS_USERNAME }} --password-stdin \
nexus.global.dns:8443/adcs/charts
# 4. Push changed Helm packages to Nexus.
- name: 'Push modified Helm packages to Nexus'

- name: 'Push modified Helm packages to the container registry'
if: "${{ github.event.inputs.release_all == 'false' }}"
env:
HELM_EXPERIMENTAL_OCI: '1'
run: |
git diff --name-only -r HEAD^1 HEAD | grep .tgz | while read line || [[ -n $line ]];
do
echo " > Pushing chart $line"
helm push $line oci://nexus.global.dns:8443/adcs/charts
helm push $line oci://TODO
done
# 5. Check if all Helm charts have to be pushed to Nexus.
- name: 'Push all Helm charts to Nexus'
- name: 'Push all Helm charts to the container registry'
if: "${{ github.event.inputs.release_all != 'false' }}"
env:
HELM_EXPERIMENTAL_OCI: '1'
run: |
ls repo | grep .tgz | while read line || [[ -n $line ]];
do
echo " > Pushing chart $line"
helm push repo/$line oci://nexus.global.dns:8443/adcs/charts
helm push repo/$line oci://TODO
done
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@ A template repository for managing Helm charts specific to a single project.
> [!WARNING]
> Work in progress.
## Configuration

## Changelogs


## Conventions

- We use the Helm `.Release.Name` as an identifier for the environment. That is, your deployment's name will be `{{ .Release.Name }}-sample`.

## Repository secrets

0 comments on commit 4c40ed2

Please sign in to comment.