Skip to content

Commit

Permalink
fix: oci conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
omidasadpour committed Aug 15, 2023
1 parent e11d110 commit 4281897
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,21 @@ jobs:
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

- name: Check changed version
id: file-changed
run: |
shopt -s nullglob
# Get packed chart file name
PKG_NAME=(.cr-release-packages/*.tgz)
if [ ${#PKG_NAME[@]} -gt 0 ]; then
echo "::set-output name=changed::true"
fi
- name: Push Helm Chart to OCI Registries
if: steps.file-changed.outputs.changed == 'true'
run: |
shopt -s nullglob
REPO_OWNER=`echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]'`
# Get packed chart file name
PKG_NAME=`ls .cr-release-packages/*.tgz`
# pushing chart to OCI registries
PKG_NAME=(.cr-release-packages/*.tgz)
helm push ${PKG_NAME} oci://registry-1.docker.io/cartesi
helm push ${PKG_NAME} oci://ghcr.io/${REPO_OWNER}/charts

0 comments on commit 4281897

Please sign in to comment.