GithubHelp home page GithubHelp logo

Comments (8)

wanisfahmyDE avatar wanisfahmyDE commented on August 17, 2024 2

If confirmed that the switch is final, I can create a PR to update the old references :)

from setup-action.

praveenrewar avatar praveenrewar commented on August 17, 2024 2

Thanks for the callout @wanisfahmyDE. This is part of the ongoing effort to move to a vendor neutral organisation in light of Carvel being accepted as a CNCF Sandbox project (Slack thread). We might have missed a couple of things like this one during the migration and we will try to fix them ASAP.

If confirmed that the switch is final, I can create a PR to update the old references :)

Yep, this is final. That will be great, thank you :)

from setup-action.

jbrunton avatar jbrunton commented on August 17, 2024 2

@wanisfahmyDE : Thanks for the context. Apparently the redirect behaviour in actions is intentionally different from workflows: https://docs.github.com/en/actions/learn-github-actions/finding-and-customizing-actions#adding-an-action-to-your-workflow

To enhance security, GitHub Actions is deprecating redirects for actions. This means that when the owner or name of an action's repository is changed, any workflows using that action with the previous name will fail.

Unfortunately I don't think there's anything else we can do about that as maintainers, but thank you for the PR - we'll get that merged.

from setup-action.

jbrunton avatar jbrunton commented on August 17, 2024 1

I'm also seeing the redirects work as expected in a workflow (including the old k14s one): https://github.com/jbrunton/test-carvel-setup-action/blob/develop/.github/workflows/test.yml

@wanisfahmyDE : Out of curiosity, are you able to spot any differences between the above workflow and the one you're using which was causing problems?

Also, thank you for the PR!

from setup-action.

praveenrewar avatar praveenrewar commented on August 17, 2024

@wanisfahmyDE BTW, I was expecting this to work (because the redirections are working), can you tell more about the environment where you are using this, maybe redirections are disabled?

P.S. I will try to test this and see if the redirection is not helpful in this scenario.

Update: Redirect seems to be working. Tested it here.

from setup-action.

wanisfahmyDE avatar wanisfahmyDE commented on August 17, 2024

@praveenrewar redirection works when hitting links in the browser, but from our github actions workflows it didn't when we were still referencing the old path

from setup-action.

praveenrewar avatar praveenrewar commented on August 17, 2024

That is weird. I am not sure what could be causing it, but glad that carvel-dev/setup-action@1 works for you.

from setup-action.

wanisfahmyDE avatar wanisfahmyDE commented on August 17, 2024

I'm also seeing the redirects work as expected in a workflow (including the old k14s one): https://github.com/jbrunton/test-carvel-setup-action/blob/develop/.github/workflows/test.yml

@wanisfahmyDE : Out of curiosity, are you able to spot any differences between the above workflow and the one you're using which was causing problems?

Also, thank you for the PR!

Hey @jbrunton i'm not sure if that's the issue, but we're actually encapsulating the carvel action in another custom action that we provide in our org and this one is composite.

the error we get is:

Error: Unable to resolve actions. Repository not found: vmware-tanzu/carvel-setup-action

our action used to look like this:

name: Deploy Helm Chart with kapp
description: Uses Carvel kapp to deploy a Helm chart with diffing and logs
inputs:
  release:
    description: Name of the Helm release that should be deployed
    required: true
    default: ${{github.event.repository.name}}
  chart:
    description: Path to or name of the chart that should be deployed
    required: true
  version:
    description: Version of the Helm chart that should be deployed
    required: true
  namespace:
    description: Kubernetes namespace into which the chart will be deployed
    required: true
    default: ${{github.event.repository.name}}
  set:
    description: A list of properties in dot notation and their values that should be passed to the Helm templating
    required: false
  value-files:
    description: A list of paths to YAML files containing values to be used by Helm templating, separated by commas
    required: false
  additional-helm-args:
    description: Additional CLI arguments that should be passed to the Helm template command
    required: false
runs:
  using: composite
  steps:
    - name: Setup Helm
      uses: azure/setup-helm@v3
      with:
        version: v3.9.4

    - name: Setup kapp
      uses: vmware-tanzu/carvel-setup-action@v1
      with:
        only: kapp
        kapp: v0.53.0

    - name: Extract ECR charts
      uses: actions-ecosystem/action-regex-match@v2
      id: ecr-regex
      with:
        text: ${{inputs.chart}}
        regex: '^oci:\/\/([0-9]{12}.dkr.ecr.[a-z0-9-]+.amazonaws.com)\/.*$'
        flags: g

    - name: Login Helm for ECR
      if: steps.ecr-regex.outputs.match != ''
      shell: bash
      run: aws ecr get-login-password | helm registry login --username AWS --password-stdin ${{steps.ecr-regex.outputs.group1}}

    - name: Determine Helm flags
      uses: actions/github-script@v6
      id: helm-flags
      env:
        VALUE_FILES: ${{inputs.value-files}}
      with:
        result-encoding: string
        # language=JavaScript
        script: |
          const valueFiles = (process.env.VALUE_FILES ?? '')
              .split(',')
              .map(x => `-f ${x}`)
              .join(' ')          
          return valueFiles

    - name: Deploy
      env:
        FORCE_COLOR: '1'
      shell: bash
      run: helm template ${{inputs.release}} ${{inputs.chart}} --version ${{inputs.version}} -n ${{inputs.namespace}} --set '${{inputs.set}}' ${{steps.helm-flags.outputs.result}} ${{inputs.additional-helm-args}} | kapp deploy -n ${{inputs.namespace}} -c -y -a ${{inputs.release}} -f-

from setup-action.

Related Issues (10)

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.