Skip to content

Commit b54df80

Browse files
authored
Switch to using the official ibmcloud-cli action (#334)
Signed-off-by: Jason Frey <[email protected]>
1 parent 630fd3c commit b54df80

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

.github/workflows/ibm-cloud-code-engine.yml

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,7 @@ env:
6161
GITHUB_SHA: ${{ github.sha }}
6262
CACHE_DIR: /tmp/.buildx-cache # BuildKit layer cache dir
6363

64-
# IBM Cloud authentication (secret) & region (variable)
65-
IBM_CLOUD_API_KEY: ${{ secrets.IBM_CLOUD_API_KEY }}
64+
# IBM Cloud region (variable)
6665
IBM_CLOUD_REGION: ${{ vars.IBM_CLOUD_REGION }}
6766

6867
# Registry coordinates (variables)
@@ -109,22 +108,20 @@ jobs:
109108
restore-keys: ${{ runner.os }}-buildx-
110109

111110
# -----------------------------------------------------------
112-
# 3️⃣ Install IBM Cloud CLI + plugins
111+
# 3️⃣ Install IBM Cloud CLI + plugins & login
113112
# -----------------------------------------------------------
114113
- name: 🧰 Install IBM Cloud CLI
115-
run: |
116-
curl -fsSL https://clis.cloud.ibm.com/install/linux | sh
117-
ibmcloud config --check-version=false
118-
ibmcloud plugin install -f container-registry
119-
ibmcloud plugin install -f code-engine
120-
ibmcloud --version
114+
uses: IBM/actions-ibmcloud-cli@v1
115+
with:
116+
api_key: ${{ secrets.IBM_CLOUD_API_KEY }}
117+
region: ${{ vars.IBM_CLOUD_REGION }}
118+
plugins: container-registry, code-engine
121119

122120
# -----------------------------------------------------------
123-
# 4️⃣ Authenticate to IBM Cloud & select Code Engine project
121+
# 4️⃣ Authenticate to IBM Cloud Code Engine project
124122
# -----------------------------------------------------------
125-
- name: 🔐 IBM Cloud login
123+
- name: 🔐 IBM Cloud Code Engine login
126124
run: |
127-
ibmcloud login --apikey "$IBM_CLOUD_API_KEY" -r "$IBM_CLOUD_REGION" -g default
128125
ibmcloud cr region-set "$IBM_CLOUD_REGION"
129126
ibmcloud cr login
130127
ibmcloud ce project select --name "$CODE_ENGINE_PROJECT"

0 commit comments

Comments
 (0)