Skip to content

Action to increment a repository variable.

License

Notifications You must be signed in to change notification settings

action-pack/increment

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

565 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Increment Variable

Build Version Size

Action to increment a repository variable. Useful for increasing a version number for example.

Features ✨

  • Automaticly creates the target variable if it does not exist
  • Supports alphanumeric variables, for example ABC1 will be increased to ABC2
  • An amount parameter for if you want to increment by a custom amount

Usage 🚀

uses: action-pack/increment@v2
id: increment
with:
  name: 'MY_VARIABLE'
  token: ${{ secrets.REPO_ACCESS_TOKEN }}

Inputs 📝

name

Required String Variable name.

amount

Optional Integer Increment by this amount (default = 1).

token

Required String Repository Access token

owner

Optional String Owners name.

repository

Optional String Repository name.

org

Optional Boolean Indicates the repo is an organization.

FAQ 💬

  • How do I read the value after incrementing?

    If you need to get the value after the increment, use: ${{ steps.increment.outputs.value }}

  • Why do I get the error 'Resource not accessible by integration'?

    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 }}

Stars 🌟

Stars

About

Action to increment a repository variable.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 8