From 5718555f7af8afd2f03ad7a8f9933672f7f1cb76 Mon Sep 17 00:00:00 2001 From: Diego Sousa Date: Tue, 3 Oct 2023 19:02:22 -0300 Subject: [PATCH] [ Variables ] - Add missing documentation for repository variables (#2032) * docs: :memo: add vars instructions by cli and file loading * docs: :memo: adjust varibles instructions --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 2902a8c..6b655f2 100644 --- a/README.md +++ b/README.md @@ -315,6 +315,14 @@ To run `act` with secrets, you can enter them interactively, supply them as envi - `act --secret-file my.secrets` - load secrets values from `my.secrets` file. - secrets file format is the same as `.env` format +# Vars + +To run `act` with repository variables that are acessible inside the workflow via ${{ vars.VARIABLE }}, you can enter them interactively or load them from a file. The following options are available for providing github repository variables: + +- `act --var VARIABLE=somevalue` - use `somevalue` as the value for `VARIABLE`. +- `act --var-file my.variables` - load variables values from `my.variables` file. + - variables file format is the same as `.env` format + # Configuration You can provide default configuration flags to `act` by either creating a `./.actrc` or a `~/.actrc` file. Any flags in the files will be applied before any flags provided directly on the command line. For example, a file like below will always use the `nektos/act-environments-ubuntu:18.04` image for the `ubuntu-latest` runner: