Skip to content

Commit

Permalink
fix for values changes
Browse files Browse the repository at this point in the history
  • Loading branch information
kalinon committed Apr 18, 2023
1 parent 22fb0a6 commit a938db5
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 2 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
on:
push:
tags:
- "*"
jobs:
dist_linux:
runs-on: ubuntu-latest
container:
image: crystallang/crystal:latest-alpine
steps:
- uses: actions/checkout@v2
- name: Get current git tag
id: tag
uses: devops-actions/[email protected]

- name: Update Libs
run: apk add --update --upgrade --no-cache --force-overwrite libxml2-dev yaml-dev gpg gpg-agent
- name: Build
run: |
shards build --production --release --no-debug --static
strip ./bin/kube-helper
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
REPO: $REPO
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: |
Changes in this Release
- Updates for this release
draft: false
prerelease: false

- name: Upload
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./bin/kube-helper
asset_name: kube-helper-${{steps.tag.outputs.tag}}-linux-x86_64
asset_content_type: binary/octet-stream
4 changes: 2 additions & 2 deletions src/kube/helper/helm.cr
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ module Kube::Helper::Helm

# Build the helm values file and provide the path. If a file path is defined, will yield that back.
def _helm_with_values(options)
if !options.values.nil? && options.values.not_nil!.raw.is_a?(String)
path = File.join(self.workdir, options.values.not_nil!.as_s)
if !options.values.nil? && options.values.not_nil!.is_a?(String)
path = File.join(self.workdir, options.values.not_nil!.as(String))
raise "Unable to find values file #{options.values}" unless File.exists?(path)
yield path
else
Expand Down

0 comments on commit a938db5

Please sign in to comment.