-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #122 from thehyve/devops/FAIRSPC-55_github_actions
Devops/fairspc 55 GitHub actions
- Loading branch information
Showing
8 changed files
with
65 additions
and
138 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: Package and Push Helm Chart | ||
|
||
on: | ||
push: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: "Version of the Helm chart to push" | ||
required: false | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Prepare version | ||
run: | | ||
VERSION=$(cat ./VERSION) | ||
BRANCH=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} | ||
echo "Building images from the branch: $BRANCH" | ||
if [ $BRANCH != "release" ]; then | ||
VERSION=$VERSION-SNAPSHOT | ||
fi | ||
# override version of custom input is provided | ||
if [[ -n "${{ github.event.inputs.version }}" ]]; then | ||
VERSION=${{ github.event.inputs.version }} | ||
fi | ||
echo "Helm charts version to be deployed: $VERSION" | ||
echo "VERSION=$VERSION" >> $GITHUB_ENV | ||
- name: Setup Helm | ||
uses: azure/setup-helm@v4.1.0 | ||
with: | ||
version: ${{ vars.HELM_VERSION }} | ||
|
||
- name: Login with Helm | ||
run: | | ||
echo ${{ secrets.GITHUB_TOKEN }} | helm registry login ${{ vars.HELM_REGISTRY }} --username ${{ github.repository_owner }} --password-stdin | ||
- name: Add/update Helm dependencies | ||
run: | | ||
helm repo add codecentric https://codecentric.github.io/helm-charts | ||
helm dependency update "charts/fairspace-keycloak" | ||
- name: Lint Helm chart | ||
run: | | ||
helm lint "charts/fairspace-keycloak" | ||
- name: Package Helm chart | ||
run: | | ||
helm package "charts/fairspace-keycloak" --version ${{ env.VERSION }} | ||
- name: Push Helm chart to repository | ||
if: github.ref == 'refs/heads/release' || github.ref == 'refs/heads/dev' | ||
run: | | ||
helm push "fairspace-keycloak-${{ env.VERSION }}.tgz" "oci://${{ vars.HELM_REGISTRY }}" |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters