Skip to content

Commit

Permalink
Merge pull request #240 from komish/test-cluster-access
Browse files Browse the repository at this point in the history
Add workflow to test cluster access for credential and endpoint changes
  • Loading branch information
komish authored Jul 27, 2023
2 parents 05dcf87 + 842cf5f commit c732bfe
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/test-cluster-access.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Test Cluster Access

# Intended to be used when cluster secrets change (e.g. when transitioning to
# new clusters), this workflow confirms access to the cluster.

on:
workflow_dispatch:

jobs:
test-cluster-access:
name: Test Cluster Access
runs-on: ubuntu-22.04
steps:
- name: Install oc
uses: redhat-actions/openshift-tools-installer@v1
with:
oc: latest
- name: Read API_SERVER endpoint
id: login-params
run: |
API_SERVER=$( echo -n ${{ secrets.API_SERVER }} | base64 -d)
echo "API_SERVER=${API_SERVER}" >> $GITHUB_OUTPUT
- uses: redhat-actions/oc-login@v1
id: oc_login
with:
openshift_server_url: ${{ steps.login-params.outputs.API_SERVER }}
openshift_token: ${{ secrets.CLUSTER_TOKEN }}
insecure_skip_tls_verify: true

0 comments on commit c732bfe

Please sign in to comment.