Skip to content

Commit dc3e87a

Browse files
ci: use POSIX [ ... ] conditionals for GCP auth mode steps
1 parent f30b43c commit dc3e87a

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

.github/workflows/deploy-gcp.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ jobs:
3131
- name: Select GCP auth mode
3232
id: auth_mode
3333
run: |
34-
if [[ -n "${{ secrets.GCP_SA_KEY }}" ]]; then
34+
if [ -n "${{ secrets.GCP_SA_KEY }}" ]; then
3535
echo "mode=key" >> "$GITHUB_OUTPUT"
36-
elif [[ -n "${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}" && -n "${{ secrets.GCP_SERVICE_ACCOUNT }}" ]]; then
36+
elif [ -n "${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}" ] && [ -n "${{ secrets.GCP_SERVICE_ACCOUNT }}" ]; then
3737
echo "mode=wif" >> "$GITHUB_OUTPUT"
3838
else
3939
echo "mode=none" >> "$GITHUB_OUTPUT"
@@ -119,9 +119,9 @@ jobs:
119119
- name: Select GCP auth mode
120120
id: auth_mode
121121
run: |
122-
if [[ -n "${{ secrets.GCP_SA_KEY }}" ]]; then
122+
if [ -n "${{ secrets.GCP_SA_KEY }}" ]; then
123123
echo "mode=key" >> "$GITHUB_OUTPUT"
124-
elif [[ -n "${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}" && -n "${{ secrets.GCP_SERVICE_ACCOUNT }}" ]]; then
124+
elif [ -n "${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}" ] && [ -n "${{ secrets.GCP_SERVICE_ACCOUNT }}" ]; then
125125
echo "mode=wif" >> "$GITHUB_OUTPUT"
126126
else
127127
echo "mode=none" >> "$GITHUB_OUTPUT"

0 commit comments

Comments
 (0)