oc-login v3 Example #693
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
name: oc-login v3 Example | |
on: | |
push: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 0 * * *' # every day at midnight | |
jobs: | |
login: | |
name: OpenShift Login and Test | |
runs-on: ubuntu-20.04 | |
env: | |
TEST_MANIFEST: __tests__/manifests/timer.yaml | |
TEST_USER: crt-redhat-github-actions-bot | |
TEST_NAMESPACE: ${{ secrets.OPENSHIFT_NAMESPACE }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install oc v3 | |
uses: redhat-actions/openshift-tools-installer@v1 | |
with: | |
oc: 3 | |
- name: Log in and set context | |
# In a real workflow, point the 'uses' to a tag. | |
# uses: redhat-actions/oc-login@v1 | |
uses: ./ | |
with: | |
openshift_server_url: ${{ secrets.OPENSHIFT_SERVER }} | |
openshift_token: ${{ secrets.OPENSHIFT_TOKEN }} | |
# openshift_username: ${{ env.TEST_USER }} | |
# openshift_password: ${{ secrets.OPENSHIFT_PASSWORD }} | |
insecure_skip_tls_verify: true | |
# certificate_authority_data: ${{ secrets.CA_DATA }} | |
namespace: ${{ env.TEST_NAMESPACE }} | |
- name: Test | |
run: | | |
oc api-resources |