Skip to content

Commit

Permalink
Fix publish release workflow (#1147)
Browse files Browse the repository at this point in the history
* Remove double quotes from if condition

* Fix getting chart version

* remove deprecated token from geekyeggo/delete-artifact
  • Loading branch information
cheels committed May 16, 2024
1 parent e20fcd6 commit 53b405f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/publish-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -425,14 +425,14 @@ jobs:
fi
- name: Checkout to hazelcast/hazelcast-platform-operator
if: always() && matrix.repo-name == "hazelcast-platform-operator"
if: always() && matrix.repo-name == 'hazelcast-platform-operator'
uses: actions/checkout@v4
with:
repository: ${{ env.REPO_OWNER }}/${{ env.REPO_NAME }}
token: ${{ env.DEVOPS_GITHUB_TOKEN }}

- name: Merge Helm Chart PR
if: always() && matrix.repo-name == "hazelcast-platform-operator"
if: always() && matrix.repo-name == 'hazelcast-platform-operator'
run: |
echo ${{ env.DEVOPS_GITHUB_TOKEN }} | gh auth login --with-token
HELM_CHART_PR_NUMBER=$(gh pr list --repo hazelcast/hazelcast-platform-operator --search "Update Helm Chart Version to ${REPLACED_VERSION}-snapshot" --json number | jq -r '.[].number')
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/test-and-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,8 @@ jobs:
- name: Deploy and Run Migration test
run: |
STABLE_VERSION=$(curl -s https://artifacthub.io/api/v1/packages/helm/hazelcast/hazelcast-platform-operator | jq -r '.version')
IFS='.' read -r MAJOR MINOR PATCH <<< "$STABLE_VERSION"
((MINOR++))
LATEST_VERSION="$MAJOR.$MINOR.$PATCH-snapshot"
LATEST_VERSION=$(curl -s https://artifacthub.io/api/v1/packages/helm/hazelcast/hazelcast-platform-operator | jq -r '.version')
STABLE_VERSION=$(curl -s https://artifacthub.io/api/v1/packages/helm/hazelcast/hazelcast-platform-operator | jq -r '.available_versions | map(select(.version | contains("snapshot") | not)) | .[0].version')
kubectl create secret generic hazelcast-license-key --from-literal=license-key=${{ env.HZ_LICENSE_KEY }}
helm repo add hazelcast https://hazelcast-charts.s3.amazonaws.com && \
Expand Down Expand Up @@ -548,7 +546,6 @@ jobs:
- name: Delete Bundle Artifact
uses: geekyeggo/delete-artifact@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: |
bundle-artifacts
Expand Down

0 comments on commit 53b405f

Please sign in to comment.