My aim is to create github workflow for publishing the plugin. Here I have to enter some command line arguments after executing some command. Can someone please tell me, whether there is a way to set the command line arguments in github action ?
If I understand you correctly - you're trying to build your GitHub Action and don't know how to pass arguments to it, correct? If so, you can use inputs
mechanism to pass arguments to your action. For example:
...
inputs:
version:
description: Plugin version
required: true
runs:
using: 'node12'
main: index.js
...
index.js
const core = require('@actions/core');
const version = core.getInput('version');
...
inputs:
version:
description: Plugin version
required: true
runs:
using: 'docker'
args:
- ${{ inputs.version }}
...
docker-entrypoint.sh
#!/bin/sh -l
echo $1 # your version
...
steps:
name: Your action usage
uses: mysuperaction@master
with:
version: 1
...