hiberbee / github-action-skaffold

Skaffold pipeline executed as Github Action
MIT License
35 stars 14 forks source link

Action is failing on deploy: unknown flag: --cache-artifacts #11

Open donnyv12 opened 3 years ago

donnyv12 commented 3 years ago

Hi all, I'm using the action below and having two problems:

  1. the action is not respecting the -v debug flag
  2. The action is failing. The reason being logged is unknown flag: --cache-artifacts but I am not setting this flag in the action, and setting cache: false makes no difference. I am running the same skaffold version locally and can run the deploy command with arguments successfully.
    Run hiberbee/github-action-skaffold@1.9.0
    with:
    command: deploy -v debug
    repository: gcr.io/PROJECT
    tag: 8e47aa2272f6284241bd2fe36ad705487c0fb9d2
    skaffold-version: 1.32.0
    container-structure-test-version: 1.10.0
    cache: true
    filename: skaffold.yaml
    skip-tests: true
    env:
    PROJECT_ID: PROJECT
    GKE_CLUSTER: CLUSTER
    GKE_ZONE: us-west2
    CLOUDSDK_METRICS_ENVIRONMENT: github-actions-setup-gcloud
    GCLOUD_PROJECT: PROJECT
    GOOGLE_APPLICATION_CREDENTIALS: REDACTED
    KUBECONFIG: REDACTED
    /usr/bin/chmod +x /home/runner/actions-runner/_work/github-reporter/github-reporter/bin/skaffold
    /home/runner/actions-runner/_work/github-reporter/github-reporter/bin/skaffold deploy -v debug --cache-artifacts=true --default-repo=gcr.io/PROJECT --tag=8e47aa2272f6284241bd2fe36ad705487c0fb9d2 --filename=skaffold.yaml --skip-tests=true
    unknown flag: --cache-artifacts
    See 'skaffold deploy --help' for usage.
    Error: The process '/home/runner/actions-runner/_work/github-reporter/github-reporter/bin/skaffold' failed with exit code 127
donnyv12 commented 3 years ago

For further context, I'm running on a self hosted runner running Ubuntu 20.04

themailman05 commented 1 year ago

@donnyv12 I ran into this myself, there's a workaround to not specify a cache for deploy-only command - use

with:
  cache-artifacts=''

in your action call - this will tell the action to drop the CLI argument, as it tries to pass the argument to deploy by default, which doesn't take an argument. I'm working on a fix in my fork.