Git Product home page Git Product logo

gitops-tag-deploy's Introduction

GitHub Action to update image tag in target Helm values.yaml

This GitHub Action checks out target repo, updates image tag in specified target file and pushes the changes.

You can add this action to your GitHub workflow for Ubuntu runners (e.g. runs-on: ubuntu-latest) as follows:

jobs:
  build:
    runs-on: ubuntu-latest
    env:
      DEPLOY_GITOPS_REPO: 'lwitkowski/playground-gitops'
      DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }}

    steps:
      - name: Deploy to test
        uses: lwitkowski/gitops-deploy-tag-action@master
        with:
          target-file: 'sample-service/test/values.yaml'

      - name: Deploy to production
        uses: lwitkowski/gitops-deploy-tag-action@master
        with:
          target-file: 'sample-service/prod/values.yaml'

TODO: how to setup DEPLOY_TOKEN secret? machine user token with repo write permissions

Configuration

The action can be configured by the following options.

Option Default Value Description
gitops-repo ${DEPLOY_GITOPS_REPO} Owner and name of target gitops repository name where yaml file is stored.
target-file mandatory Path to yaml file inside gitops repo to be updated.
docker-image-tag ${GITHUB_SHA::6} Docker image tag to be set in target yaml file.
env.DEPLOY_TOKEN mandatory Github access token with write permission to gitops repo. Should be set as env variable in calling workflow.

Note: Running this action on pull_request_target events is dangerous if combined with code checkout and code execution.

gitops-tag-deploy's People

Contributors

zohebs341 avatar

Watchers

 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.