|
61 | 61 | GITHUB_SHA: ${{ github.sha }}
|
62 | 62 | CACHE_DIR: /tmp/.buildx-cache # BuildKit layer cache dir
|
63 | 63 |
|
64 |
| - # IBM Cloud authentication (secret) & region (variable) |
65 |
| - IBM_CLOUD_API_KEY: ${{ secrets.IBM_CLOUD_API_KEY }} |
| 64 | + # IBM Cloud region (variable) |
66 | 65 | IBM_CLOUD_REGION: ${{ vars.IBM_CLOUD_REGION }}
|
67 | 66 |
|
68 | 67 | # Registry coordinates (variables)
|
@@ -109,22 +108,20 @@ jobs:
|
109 | 108 | restore-keys: ${{ runner.os }}-buildx-
|
110 | 109 |
|
111 | 110 | # -----------------------------------------------------------
|
112 |
| - # 3️⃣ Install IBM Cloud CLI + plugins |
| 111 | + # 3️⃣ Install IBM Cloud CLI + plugins & login |
113 | 112 | # -----------------------------------------------------------
|
114 | 113 | - 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 |
121 | 119 |
|
122 | 120 | # -----------------------------------------------------------
|
123 |
| - # 4️⃣ Authenticate to IBM Cloud & select Code Engine project |
| 121 | + # 4️⃣ Authenticate to IBM Cloud Code Engine project |
124 | 122 | # -----------------------------------------------------------
|
125 |
| - - name: 🔐 IBM Cloud login |
| 123 | + - name: 🔐 IBM Cloud Code Engine login |
126 | 124 | run: |
|
127 |
| - ibmcloud login --apikey "$IBM_CLOUD_API_KEY" -r "$IBM_CLOUD_REGION" -g default |
128 | 125 | ibmcloud cr region-set "$IBM_CLOUD_REGION"
|
129 | 126 | ibmcloud cr login
|
130 | 127 | ibmcloud ce project select --name "$CODE_ENGINE_PROJECT"
|
|
0 commit comments