question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Configure using the `with` parameter

See original GitHub issue

Configuration should be done using the with parameter instead of having to create a separate YAML file. We can still keep support for the YAML file as not to cause breaking changes for people who use the master version of this Action, or we could create a ticket in the repo to give users a heads up.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:2
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
TimonVScommented, Sep 25, 2019
name: PR Labeler
on:
  pull_request:
    types: [opened]

jobs:
  pr-labeler:
    runs-on: ubuntu-latest
    steps:
      - uses: TimonVS/pr-labeler-action@master
        with:
          feature: ['feature/*', 'feat/*']
          fix: fix/*
          chore: chore/*
          fixed-branch: fixed-branch-name
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

In the above example each parameter provided to the with parameter will be exposed as an environment variable prefixed with INPUT_ (see https://help.github.com/en/articles/workflow-syntax-for-github-actions#jobsjob_idstepswith). So we can filter process.env to only include environment variables that are prefixed with INPUT_ and we have our config. The only downside is that an environment variable is always a string. So the array in the above example has to be evalled and another list syntax won’t work. The huge benefit is that configuration can be done right within the workflow instead of having to create a separate YAML file.

2reactions
asbjornucommented, Feb 26, 2021

GITHUB_TOKEN can also preferably be passed in the with section, so env can be removed completely.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Use parameters to ask for input when running a query
In the Query Parameters box, in the Parameter column, enter the prompt for each parameter you want to specify a data type for....
Read more >
Configuration Parameters - Vertica
Configuration parameters are settings that affect database behavior. You can use configuration parameters to enable, disable, or tune features related to ...
Read more >
TeamCity On-Premises - Configuring Build Parameters
This article explains how to configure build parameters. See how to use them inside build settings and build scripts.
Read more >
Create Parameters - Tableau Help
In the Data pane, click the drop-down arrow in the upper right corner and select Create Parameter. · In the Create Parameter dialog...
Read more >
Configuration Parameter - an overview | ScienceDirect Topics
Configuration parameters are stored in a variety of ways depending on the ... using Extensible Markup Language (XML) based databases for configuration ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found