You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
GitHub Action
Branch Name Default
v2.0.0
Action created by clicksign's devops team
Use this template to bootstrap the creation of a TypeScript action.:rocket:
This template includes compilation support, tests, a validation workflow, publishing, and versioning guidance.
If you are new, there's also a simpler introduction. See the Hello World JavaScript Action
First, you'll need to have a reasonably modern version of
node
handy. This won't work with versions older than 9, for instance.
Install the dependencies
$ yarn
Build the typescript and package it for distribution
$ yarn build && yarn package
The action.yml defines news inputs and output for action.
Inputs | required | default | description |
---|---|---|---|
allowed_branch_list | false | main,release,feature,devops,hotfix,fix,dependabot | Add list branch validate, separeted with , |
payload | false | null | Create payload to slack message |
channel_id | false | null | Add chanel id slack |
name: 'build-test'
on:
create
jobs:
test: # make sure the action works on a clean machine without building
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: clicksign/branch-name-action
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }}
with:
allowed_branch_list: ${{ secrets.ALLOWED_BRANCH_LIST }}
channel_id: ${{ secrets.CHANNEL_ID }}