- Automaticly creates the target variable if it does not exist
- Supports alphanumeric variables, for example
ABC1
will be increased toABC2
- An
amount
parameter for if you want to increment by a custom amount
uses: step-security/increment@v2
id: increment
with:
name: 'MY_VARIABLE'
token: ${{ secrets.REPO_ACCESS_TOKEN }}
Required String
Variable name.
Optional Integer
Increment by this amount (default = 1).
Required String
Repository Access token
Optional String
Owners name.
Optional String
Repository name.
Optional Boolean
Indicates the repo is an organization.
-
If you need to get the value after the increment, use:
${{ steps.increment.outputs.value }}
-
This will happen if you use
secrets.GITHUB_TOKEN
.You need to create a personal access token instead.
Go to your Github settings, select 'Developer settings' --> 'Personal access tokens' --> 'Tokens (classic)' and create a new token. Store its value in a secret, for example
MY_TOKEN
.Then refer to it like this:
token: ${{ secrets.MY_TOKEN }}