Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example workflow throws an error #79

Open
mikarinneoracle opened this issue Jan 8, 2025 · 4 comments
Open

Example workflow throws an error #79

mikarinneoracle opened this issue Jan 8, 2025 · 4 comments

Comments

@mikarinneoracle
Copy link

Example workflow throws an error: No event triggers defined in on

Fixed workflow example here:
https://github.com/mikarinneoracle/OKE-kubectl/blob/main/.github/workflows/main.yml

@Djelibeybi
Copy link
Member

Hey Mika, you might need to use the privateEndpoint option if your runner is on the same VCN as the OKE endpoint.

@mikarinneoracle
Copy link
Author

This example given does not work as you will get this error 'No event triggers defined in on'

(And no it is not in the same VCN, can be ubuntu-latest like in your below)

jobs:
  install-kubectl:
    runs-on: ubuntu-latest
    name: Install Kubectl for OKE
    env:
      OCI_CLI_USER: ${{ secrets.OCI_CLI_USER }}
      OCI_CLI_TENANCY: ${{ secrets.OCI_CLI_TENANCY }}
      OCI_CLI_FINGERPRINT: ${{ secrets.OCI_CLI_FINGERPRINT }}
      OCI_CLI_KEY_CONTENT: ${{ secrets.OCI_CLI_KEY_CONTENT }}
      OCI_CLI_REGION: ${{ secrets.OCI_CLI_REGION }}

    steps:
      - name: Configure Kubectl
        uses: oracle-actions/[email protected]
        id: test-configure-kubectl-oke-action
        with:
          cluster: ${{ secrets.OKE_CLUSTER_OCID }}

      - name: Run Kubectl
        run: kubectl get nodes -A

@mikarinneoracle
Copy link
Author

This works:

name: OKE kubectl testing

on:
  push:
    branches: [ "main" ]
  pull_request:
    branches: [ "main" ]

jobs:
  build:

    runs-on: ubuntu-latest
    name: Install Kubectl for OKE
    env:
      OCI_CLI_USER: ${{ secrets.OCI_CLI_USER }}
      OCI_CLI_TENANCY: ${{ secrets.OCI_CLI_TENANCY }}
      OCI_CLI_FINGERPRINT: ${{ secrets.OCI_CLI_FINGERPRINT }}
      OCI_CLI_KEY_CONTENT: ${{ secrets.OCI_CLI_KEY_CONTENT }}
      OCI_CLI_REGION: ${{ secrets.OCI_CLI_REGION }}

    steps:
      - name: Configure Kubectl
        uses: oracle-actions/[email protected]
        id: test-configure-kubectl-oke-action
        with:
          cluster: ${{ secrets.OKE_CLUSTER_OCID }}

      - name: Run Kubectl
        run: kubectl get nodes -A

@Djelibeybi
Copy link
Member

I'll try and reproduce this either tomorrow or early next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants