Giter VIP home page Giter VIP logo

Comments (4)

colinjfw avatar colinjfw commented on July 17, 2024

I believe this should look something like the structure below. It does have two problems:

  • I'm not sure how to get the short 7 char sha here.
  • I don't think that reuse-values is a valid option but we could easily add that to the arguments.
# .github/workflows/deploy.yml
name: Deploy
on: ['registry_package']

jobs:
  deployment:
    runs-on: 'ubuntu-latest'
    steps:
    - uses: actions/checkout@v1

    - name: 'Update'
      uses: 'deliverybot/helm@v1'
      with:
        release: 'nginx'
        namespace: 'default'
        chart: 'app'
        token: '${{ github.token }}'
        reuse-values: true # TODO: Need to add this as an option I believe.
        values: |
          service-name:
            image:
              tag: '${{ github.sha }}' # TODO: This isn't the short sha not sure how to get that.
      env:
        KUBECONFIG_FILE: '${{ secrets.KUBECONFIG }}'

from helm.

riker09 avatar riker09 commented on July 17, 2024

This looks promising. Getting a short GITHUB_SHA could be done by a previous step.

jobs:
  deployment:
    runs-on: 'ubuntu-latest'
    steps:
    - uses: actions/checkout@v1

    - name: 'Create short SHA'
      runs: |
        export SHORT_SHA=${GITHUB_SHA:0:7}

    - name: 'Update'
      # [...]

This is not tested, I just assume that the exported value is available in subsequent steps. I definitely could make it work with a custom action.

from helm.

colinjfw avatar colinjfw commented on July 17, 2024

I believe that you need to use a special set command to have a variable appear in a subsequent step although Iā€™m not sure.

from helm.

riker09 avatar riker09 commented on July 17, 2024

Yes, a GitHub Action may have output which you can reference in later steps. See https://help.github.com/en/actions/building-actions/metadata-syntax-for-github-actions#outputs and https://help.github.com/en/actions/reference/development-tools-for-github-actions#set-an-output-parameter-set-output

But skimming through the documentation I just noticed that there is indeed a command to set environmental variables for later steps directly (so no fiddling with action output):

::set-env name={name}::{value}

See reference.

from helm.

Related Issues (20)

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.