Skip to content

Github Action to post the address of a kubernetes load balancer.

License

Notifications You must be signed in to change notification settings

SmartsquareGmbH/post-k8s-lb

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

About

GitHub Action to post the address of a load balancer.

Screenshot

This action will fetch the information about the given ingress and post the ip as a pull request comment. We @smartsquarehq use this action after we've deployed the preview of a pull request so that the reviews can explore the new features without messing around with the technical details.

🚀 Usage

This action uses the default kubernetes configuration so make sure that you have setup the cluster.

name: review-deployment

on: [ pull_request ]

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/[email protected]

      - name: Setup doctl
        uses: digitalocean/[email protected]
        with:
          token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}

      - name: Setup kubeconfig
        run: doctl kubernetes cluster kubeconfig save k8s-1-19-6-do-0-fra1-512312313
      
      - uses: smartsquaregmbh/[email protected]
        with:
          namespace: "my-namespace"
          loadbalancer: "my-loadbalancer"

🚅 Keep up-to-date with GitHub Dependabot

Since Dependabot has native GitHub Actions support , to enable it on your GitHub repo all you need to do is add the .github/dependabot.yml file:

version: 2
updates:
  # Maintain dependencies for GitHub Actions
  - package-ecosystem: "github-actions"
    directory: "/"
    schedule:
      interval: "daily"

⚠️ Limitations

  • The action itself do not check for duplicate comments now.
  • The action can only handle one load balancer at a time.

📚 Resources