-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #240 from komish/test-cluster-access
Add workflow to test cluster access for credential and endpoint changes
- Loading branch information
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |