GithubHelp home page GithubHelp logo

javier-b-perez / github-action-skaffold Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hiberbee/github-action-skaffold

0.0 2.0 0.0 1001 KB

Skaffold pipeline executed as Github Action

License: MIT License

Dockerfile 0.27% JavaScript 99.09% Mustache 0.64%

github-action-skaffold's Introduction

Skaffold Github Action

License GitHub Action Status GitHub Workflow Version

Skaffold is a command line tool that facilitates continuous development for Kubernetes applications. You can iterate on your application source code locally then deploy to local or remote Kubernetes clusters. Skaffold handles the workflow for building, pushing and deploying your application. It also provides building blocks and describe customizations for a CI/CD pipeline.

This action allows you to execute skaffold commands as Github Action. Repository is self-testable, so you can refer to Skaffold manifest, Container Structure tests and Github workflow

Installed versions

  • skaffold 1.31.0
  • container-structure-test 1.10.0

Inputs

Required

Optional

Name Description Default
skaffold-version Set Skaffold version 1.31.0
container-structure-test-version Set Container Structure Test version 1.10.0
working-directory Set current working directory similar to Github Actions run ${{ github.workspace }}
filename Path or URL to the Skaffold config file skaffold.yaml
command Set Skaffold profile name version
default-repo Default repository value (overrides global config) n/a
build-image Set Skaffold profile name n/a
kube-context Deploy to this Kubernetes context n/a
kubeconfig Path to the kubeconfig file to use for CLI requests n/a
namespace Run deployments in the specified namespace n/a
profile Activate profiles by name n/a
skip-tests Whether to skip the tests after building n/a
tag The optional custom tag to use for images which overrides the current Tagger configuration n/a
cache-artifacts Set to false to disable default caching of artifacts true

Outputs

Example

See example with build, test & deployment simple Helm chart from Dockerfile to local K8S mini cluster.

name: Skaffold
on:
  push:
    paths:
      - src/**
      - .github/workflows/ci.yml
      - action.yml
jobs:
  pipiline:
    name: Skaffold Pipiline
    runs-on: ubuntu-20.04
    steps:
      - name: Checkout sources
        uses: actions/checkout@v2

      - name: Setup Minikube
        uses: hiberbee/[email protected]

      - name: Setup Helm
        uses: hiberbee/[email protected]
        with:
          repository-config: test/repositories.yaml

      - name: Login to Docker Hub
        uses: docker/login-action@v1
        with:
          registry: ${{ secrets.DOCKER_REGISTRY }}
          username: ${{ secrets.DOCKER_USERNAME }}
          password: ${{ secrets.DOCKER_PASSWORD }}

      - name: Run Skaffold pipeline as action
        uses: hiberbee/[email protected]
        with:
          command: run
          default-repo: ${{ secrets.DOCKER_REGISTRY }}

      - name: Get Helm releases
        run: helm list

CLI usage

You can use that action just to set up Skaffold and then perform actions manually. Here is code sample:

jobs:
  pipiline:
    name: Skaffold Pipiline
    runs-on: ubuntu-20.04
    steps:
      - name: Setup Skaffold
        uses: hiberbee/[email protected]
        with:
          command: diagnose

      - name: Build Docker images
        run: skaffold build
        env:
          SKAFFOLD_DEFAULT_REPO: ${{ secrets.DOCKER_REGISTRY }}

github-action-skaffold's People

Contributors

vladyslavvolkov avatar dependabot[bot] avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.