chore(workflow): replace ci tag with regex in release workflow (#342)

Signed-off-by: Akhil Mohan <akhil.mohan@mayadata.io>
This commit is contained in:
Akhil Mohan 2021-06-11 20:01:43 +05:30 committed by GitHub
parent 4e73638b5a
commit d5540253be
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -66,17 +66,18 @@ jobs:
- name: Configure Git - name: Configure Git
run: | run: |
git config user.name "$GITHUB_ACTOR" git config user.name "GitHub Actions"
git config user.email "$GITHUB_ACTOR@openebs.io" git config user.email "actions@github.com"
- name: Update Operator YAML - name: Update Operator YAML
if: "!github.event.release.prerelease"
run: | run: |
echo "update the operator yaml with the image tag" echo "update the operator yaml with the image tag"
sed -i "s/zfs-driver:ci/zfs-driver:${RELEASE_TAG}/" deploy/yamls/zfs-driver.yaml sed -i "s/zfs-driver:.*/zfs-driver:${RELEASE_TAG}/" deploy/yamls/zfs-driver.yaml
sed -i "s/openebs.io\/version: ci/openebs.io\/version: ${RELEASE_TAG}/" deploy/yamls/zfs-driver.yaml sed -i "s/openebs.io\/version:.*/openebs.io\/version: ${RELEASE_TAG}/" deploy/yamls/zfs-driver.yaml
sed -i "s/zfs-driver:ci/zfs-driver:${RELEASE_TAG}/" deploy/zfs-operator.yaml sed -i "s/zfs-driver:.*/zfs-driver:${RELEASE_TAG}/" deploy/zfs-operator.yaml
sed -i "s/openebs.io\/version: ci/openebs.io\/version: ${RELEASE_TAG}/" deploy/zfs-operator.yaml sed -i "s/openebs.io\/version:.*/openebs.io\/version: ${RELEASE_TAG}/" deploy/zfs-operator.yaml
sed -i "s/newTag: ci/newTag: ${RELEASE_TAG}/" deploy/yamls/kustomization.yaml sed -i "s/newTag:.*/newTag: ${RELEASE_TAG}/" deploy/yamls/kustomization.yaml
git diff --quiet deploy/ || CHANGED=$? git diff --quiet deploy/ || CHANGED=$?
if [[ $CHANGED -ne 0 ]]; then if [[ $CHANGED -ne 0 ]]; then