Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Copilot Lvl 2
Message 1 of 2

Default Metadata Values Not Working With Docker

Hi There,

I am following the documentation for passing inputs into my Docker based GitHub Action: https://help.github.com/en/articles/metadata-syntax-for-github-actions#inputs

 

The docker container doesn't pickup the "defaults" values in the INPUT_ environment variable.

 

action.yaml:

 

inputs:
  lintAllFiles:
    description: 'Uses Vale to lint all files, even ones that didn't change. By default only files that have changed will be linted.'
    required: false
    default: 'bot'
  lintDirectory:
    description: 'If specified, Vale will only look for files to validate inside this directory'
    required: false
    default: '.'
  fileGlob:
    description: 'File glob of what files to run vale against'
    required: false
    default: '*.{md,rst}'

 

entrypoint.sh in the Dockerfile:

 

#!/bin/sh
# http://redsymbol.net/articles/unofficial-bash-strict-mode/
set -eo pipefail
IFS=$'\n\t'

echo "Settings:"
echo ""
echo "lintAllFiles: ${INPUT_LINTALLFILES}"
echo "lintDirectory: ${INPUT_LINTDIRECTORY}"
echo "fileGlob: $INPUT_FILEGLOB"


This results in empty settings values being outputed (with no default).

If I set some "with" options in my workflow:

name: test

on:
  push:

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@master
    - uses: ./.github/actions/vale
      name: vale
      with:
        fileGlob: '*.{md}'

 

The docker container can see the the INPUT_FILEGLOB environment variable as the *.{md} override value.

It appears the input defaults doesn't work in the action.yaml.

 

1 Reply
GitHub Staff
Message 2 of 2

Re: Default Metadata Values Not Working With Docker

Sorry about the trouble here.  We're investigating this issue.