Skip to content

Commit

Permalink
feat: update cli installation method and add test workflow (#6)
Browse files Browse the repository at this point in the history
* feat: update cli installation method

idt is deprecated, switch to the offical cli installation method

* chore: fix grammar and remove version specifier

* ci(test): add test workflow

---------

Co-authored-by: Michael Lin <[email protected]>
  • Loading branch information
ElioDiNino and michaellzc authored Jul 26, 2024
1 parent d522a0b commit 9501f26
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 11 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Test IBM Cloud CLI Action
on:
pull_request:
branches:
- main
push:
branches:
- main
schedule:
- cron: "0 0 * * *"

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Configure IBM Cloud CLI
uses: ./
with:
ibm-cloud-api-key: ${{ secrets.IBM_CLOUD_API_KEY }}
ibm-cloud-region: "us-south"
ibm-cloud-cli-plugins: "container-registry,cloud-object-storage"
2 changes: 0 additions & 2 deletions .whitesource
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@

{
"settingsInheritedFrom": "ibm-skills-network/mend-config@main"
}

12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
Add the following to your workflow

```yml
- name: Configure IBM Cloud CLI
uses: ibm-skills-network/action-ibmcloud-cli@v1
with:
ibm-cloud-api-key: ${{ secrets.IBM_CLOUD_API_KEY }}
ibm-cloud-region: us-south
ibm-cloud-cli-plugins: kubernetes-service,container-registry
- name: Configure IBM Cloud CLI
uses: ibm-skills-network/action-ibmcloud-cli@main
with:
ibm-cloud-api-key: ${{ secrets.IBM_CLOUD_API_KEY }}
ibm-cloud-region: us-south
ibm-cloud-cli-plugins: container-service,container-registry
```
6 changes: 3 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ branding:
inputs:
ibm-cloud-api-key:
description: >-
IBM Cloud Api Key. This input is required to interact with the IBM Cloud CLI.
IBM Cloud API Key. This input is required to interact with the IBM Cloud CLI.
required: true
ibm-cloud-region:
description: >-
Expand All @@ -16,13 +16,13 @@ inputs:
required: false
ibm-cloud-cli-plugins:
description: >-
IBM Cloud CLI Plugins. A comma-seperate list of plugins.
IBM Cloud CLI Plugins. A comma-separated list of plugins.
required: false

runs:
using: "composite"
steps:
- run: curl -sL https://raw.githubusercontent.com/IBM-Cloud/ibm-cloud-developer-tools/master/linux-installer/idt-installer | bash
- run: curl -fsSL https://clis.cloud.ibm.com/install/linux | sh
shell: bash
- run: ibmcloud login --apikey "${{ inputs.ibm-cloud-api-key }}" -r "${{ inputs.ibm-cloud-region }}"
shell: bash
Expand Down

0 comments on commit 9501f26

Please sign in to comment.