Coder Social home page Coder Social logo

setup-kustomize's Introduction

Description

Install any kustomize version as a step in your workflow

Options

Every argument is optional.

Input Description
github-token PAT (Personal Access Token) for authorizing the repository.
Defaults to ${{ github.token }}
kustomize-version Semver of kustomize to use. Examples: 10.x, 10.15.1, >=10.15.0
Defaults to *
fail-fast When github rate limits us, fail immediately or retry after the timeout that github wishes from us?
Note: When this is set to false, a github workflow might accrue a long (and possibly expensive) runtime.
Defaults to true

Usage

on:
  push:
    branches:
      - master

jobs:
  create-deployment-branch:
    runs-on: ubuntu-latest
    needs:
      - publish-image
    steps:
      - uses: imranismail/setup-kustomize@v2
      - run: |
          kustomize edit set image app:${GITHUB_SHA}
          git add .
          git commit -m "Set `app` image tag to `${GITHUB_SHA}`"
          git push

setup-kustomize's People

Contributors

dependabot[bot] avatar imranismail avatar pthorin avatar toelke avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

setup-kustomize's Issues

Permission denied error

We run into the following issue with the latest version from master:

/home/runner/work/_temp/e10705b9-a8bf-4690-844d-806bcdbba20e.sh: line 1: /opt/hostedtoolcache/kustomize/3.2.1/x64/kustomize: Permission denied
error: no objects passed to apply

It seems that kustomize does not have the executable flag set. Another step like this fixes it:

- name: Make kustomize executable
  run: chmod +x /opt/hostedtoolcache/kustomize/3.2.1/x64/kustomize

Is it possible for this action to set the flag itself?

Started Erroring today

I've been using this and it's worked until recently. The error I'm getting is

Error: ENOENT: no such file or directory, chmod '/home/runner/work/_temp/5498170d-fce5-4d76-8267-c16d8194ccb4/kustomize'

Any help is appreciated.

Fix deprecation warning for Node 16

Current State

Using setup-kustomize@2 results in a deprecation warning about Node 16:

Screenshot 2024-02-13 at 13 31 44

Expected State

Using setup-kustomize must not have deprecation warnings about unsupported Node versions.

https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/

I searched the code for node 16 but did not find it to fix it. So I am not sure why this issue is appearing but please try to fix it because it seems like Node 16 is used somewhere.

Make 'fail-fast: true' the default behavior as major version update

Hey @imranismail, hope this finds you well.

As you pointed out in the README.md, the default false behavior of fail-fast might accrue a long and expensive run time.

If the default behavior of fail-fast were true, when the rate-limit is reached, users would instantly be notified of the failed workflow run.
Users would then be allowed to act accordingly. (Some may simply wait it out; others may choose to explicitly turn off fail-fast.)

On the other hand, if the default behavior of fail-fast is false (as it currently is now), when the rate-limit is reached,
the github workflow will silently run for a long time (theoretically up to an additional 1 hour) without any particular notice to the user.

Worst case scenario, github user will not notice anything until they are met with an expensive bill at the end of their payment cycle (= 1 month or, worse, 1 year).

May I ask would you be willing to release a v2 major version update (because it's a breaking change) where fail-fast default is true?
I think it's good practice and in good faith to the community to have the less silently dangerous option be the default.

Unable to find Kustomize version '3.6.1' for platform 'linux' and architecture amd64.

I'm using kustomize in my Github actions workflow. As of today I receive the following error when executing a Github action workflow.

Unable to find Kustomize version '3.6.1' for platform 'linux' and architecture amd64.

I filed a bug with the Github actions team. They investigated at actions/runner-images#2485 . Their feedback was as follows:

Looks like when setup-kustomize retrieves the list of versions kubernetes-sigs/kustomize, pagination doesn't work properly and it retrieves only first 30 results.
Previously, it worked but recently, a bunch of new versions were added to https://github.com/kubernetes-sigs/kustomize and version 3.6.1 is not in the first 30 results.

In the Github Action we use; imranismail/setup-kustomize@v1 to download and install kustomize in runtime from https://github.com/kubernetes-sigs/kustomize.

Attached is my master.yml which references imranismail/setup-kustomize which in-turn runs setup-kustomize:

`
name: CI
on:
push:
branches: [master]

jobs:
build:
runs-on: ubuntu-latest

steps:
  - uses: actions/checkout@v2
    with:
      fetch-depth: 0

  - uses: azure/docker-login@v1
    with:
      login-server: 
      username: 
      password: 

  - name: Run the auto build script
    run: _build/auto/build-and-push.rb sandbox

deploy:
needs: build

runs-on: ubuntu-latest

steps:
  # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
  - uses: actions/checkout@v2
    with:
      fetch-depth: 0

  - uses: imranismail/setup-kustomize@v1
    with:
      kustomize-version: "3.6.1"

  - uses: azure/k8s-set-context@v1
    with:
      method: kubeconfig
      kubeconfig: ${{ secrets.KUBECONFIG }}

  - uses: azure/k8s-set-context@v1
    with:
      method: kubeconfig
      context: careful
      kubeconfig: ${{ secrets.KUBECONFIG }}

  - name: Run the auto build script
    run: _build/auto/deploy.rb sandbox

`
Platform

Ubuntu-latest

Node run failed with exit code 1

Any idea what's wrong?

Screenshot 2019-10-18 at 13 04 39

Output from log file:

2019-10-18T09:51:37.0474395Z ##[group]Run imranismail/[email protected]
2019-10-18T09:51:37.0474586Z with:
2019-10-18T09:51:37.0474724Z   kustomize-version: 3.2.3
2019-10-18T09:51:37.0474866Z env:
2019-10-18T09:51:37.0475004Z   REGISTRY_HOST: docker.pkg.github.com
2019-10-18T09:51:37.0475151Z   IMAGE_NAME: admin-monacofit
2019-10-18T09:51:37.0475293Z   K8S_CLUSTER_NAME: monacofit-com
2019-10-18T09:51:37.0475465Z ##[endgroup]
2019-10-18T09:51:37.2667783Z ##[error]Node run failed with exit code 1
2019-10-18T09:51:37.2781913Z Cleaning up orphan processes

Action doesn't install version 3.5.4

I used this action to install v3.5.4 and it failed (it only was successful, if it could get the tool from the cache).
Then I checked with v3.5.5 and it also failed.

While an installation of 3.8.5 was successful.

Is it possible, that the paginate.iterator only gets the first few pages and misses all the remaining?

for await (const response of octokit.paginate.iterator(

Error: Not Found

I am trying to implement this action in my Organization. We run workflows against our own runners, mostly centos vms. Once added this action fails with "Error: Not Found." No additional description is available. Is it something you can look into ?

Rate limited by Github

image

We're using this action in production and have been facing a lot of Rate limiting by Github Api
seems to be connected with the unauthorized Api rate limit which is 60/hr
can we include access_token in this action to make authorize calls?

The `add-path` command is deprecated and will be disabled soon

This action has started to throw the following warning

Warning: The `add-path` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/

Which seems to be triggered here

setup-kustomize/dist/index.js

Lines 5436 to 5439 in d6406c9

function addPath(inputPath) {
command_1.issueCommand('add-path', {}, inputPath);
process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`;
}

Specifically line 5437

The changelog recommendation is to updating $GITHUB_PATH

https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#adding-a-system-path

The default value of `3.x` for `kustomize-version` results in an error

Like the title says, I got the below error when I used the action without setting an explicit version:

Run imranismail/setup-kustomize@v1
Error: Unable to find Kustomize version '3.x' for platform linux and architecture x64.

The step in my workflow looked like:

- uses: imranismail/setup-kustomize@v1

I was running this on a self-hosted runner on linux.

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.