Skip to content
This repository has been archived by the owner on Dec 11, 2020. It is now read-only.

Allows action to perform different operations based on inputs #32

Merged
merged 7 commits into from
Jun 23, 2020

Conversation

lstocchi
Copy link
Collaborator

This is related to #28

Now users can use the action to perform a different set of operations.

  • If only the version is set the action will only download the oc executable requested and add it to the PATH so the following steps can have access to this
    steps:
    - name: OpenShift Action
      uses: redhat-developer/openshift-action
      with:
        version: '3.11.90'
    - name: scripttest
      run: |
        oc login --token=${{ secrets.API_TOKEN }} --server=${{ secrets.OPENSHIFT_SERVER_URL }}
        oc get pods | grep build
  • If version, openshift_server_url and parameters are set, the action will download oc, set up the PATH and login to the cluster
    steps:
    - name: OpenShift Action
      uses: redhat-developer/openshift-action
      with:
        version: '3.11.90'
        openshift_server_url: ${{ secrets.OPENSHIFT_SERVER_URL }}
        parameters: '{"apitoken": "${{ secrets.API_TOKEN }}", "acceptUntrustedCerts": "true"}'
    - name: scripttest
      run:  oc get pods | grep build
  • if version, openshift_server_url, parameters and commands are set the action will work as before

…xecuting commands

Signed-off-by: Luca Stocchi <lstocchi@redhat.com>
Signed-off-by: Luca Stocchi <lstocchi@redhat.com>
Signed-off-by: Luca Stocchi <lstocchi@redhat.com>
Signed-off-by: Luca Stocchi <lstocchi@redhat.com>
Signed-off-by: Luca Stocchi <lstocchi@redhat.com>
Signed-off-by: Luca Stocchi <lstocchi@redhat.com>
Signed-off-by: Luca Stocchi <lstocchi@redhat.com>
@lstocchi lstocchi merged commit 1c258ca into redhat-developer:master Jun 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant