Skip to content

Commit f1e5c15

Browse files
committed
github workflow new output method and v2.1 hard force
1 parent ff2d9fe commit f1e5c15

File tree

1 file changed

+22
-10
lines changed

1 file changed

+22
-10
lines changed

.github/workflows/deploy.yml

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,22 +36,32 @@ jobs:
3636
id: refvar
3737
env:
3838
GH_REF: ${{ github.event.client_payload.gh_ref }}
39-
run: echo "::set-output name=gitRefName::${GH_REF#refs/*/}"
39+
run: echo "gitRefName=${GH_REF#refs/*/}" >> $GITHUB_OUTPUT
4040

4141
- name: Compute API version
4242
id: apiVersionVar
43+
shell: bash
4344
run: |
4445
export gitRefName="${{ steps.refvar.outputs.gitRefName }}"
45-
if [[ "$gitRefName" == "main" ]]; then \
46-
echo "::set-output name=apiVersion::latest" ; \
47-
else \
46+
if [[ "$gitRefName" == "main" ]]; then
47+
export apiVersion=latest
48+
else
4849
export tagFirstPart=$(echo "${{ steps.refvar.outputs.gitRefName }}" | cut -d '.' -f1)
49-
if [[ $tagFirstPart == "v*" ]]; then \
50-
echo "::set-output name=apiVersion::${tagFirstPart}" ; \
51-
else \
52-
echo "::set-output name=apiVersion::v${tagFirstPart}" ; \
53-
fi ; \
50+
if [[ $tagFirstPart == "v*" ]]; then
51+
export apiVersion=${tagFirstPart}
52+
else
53+
export apiVersion=v${tagFirstPart}
54+
fi
5455
fi
56+
echo "apiVersion=${apiVersion}" >> $GITHUB_OUTPUT
57+
58+
echo "Hack to get last v2.1 install script if needed"
59+
if [[ "${apiVersion}" == "v2" ]]; then
60+
export apiScriptVersion=v2.1
61+
else
62+
export apiScriptVersion=${apiVersion}
63+
fi
64+
echo "apiScriptVersion=${apiScriptVersion}" >> $GITHUB_OUTPUT
5565
5666
- name: Prepare values.yaml
5767
env:
@@ -114,8 +124,10 @@ jobs:
114124
TLS_CERTIFICATE_TYPE: let_s_encrypt
115125
COSMOTECH_API_DNS_NAME: ${{ secrets.DEV_ENV_COSMOTECH_API_DNS_NAME }}
116126
TLS_CERTIFICATE_LET_S_ENCRYPT_CONTACT_EMAIL: ${{ secrets.DEV_ENV_TLS_CERTIFICATE_LET_S_ENCRYPT_CONTACT_EMAIL }}
127+
REDIS_DISK_SIZE: 128
128+
REDIS_DISK_RESOURCE: "/subscriptions/a24b131f-bd0b-42e8-872a-bded9b91ab74/resourceGroups/phoenixdev/providers/Microsoft.Compute/disks/cosmotech-database-disk"
117129
run: |
118-
curl -o- -sSL https://raw.githubusercontent.com/Cosmo-Tech/azure-platform-deployment-tools/main/deployment_scripts/${{ steps.apiVersionVar.outputs.apiVersion }}/deploy_via_helm.sh | bash -s -- \
130+
curl -o- -sSL https://raw.githubusercontent.com/Cosmo-Tech/azure-platform-deployment-tools/main/deployment_scripts/${{ steps.apiVersionVar.outputs.apiScriptVersion }}/deploy_via_helm.sh | bash -s -- \
119131
"${GH_SHA}" \
120132
"${NAMESPACE}" \
121133
"${ARGO_POSTGRESQL_PASSSORD}" \

0 commit comments

Comments
 (0)