Skip to content

Commit

Permalink
Add App Name to Build Notifier (#1)
Browse files Browse the repository at this point in the history
* feat: Add app_name to build notifier

* docs: Bump version and readme format

* chore: npm run prepare

* chore: add PR template
  • Loading branch information
madclouds authored Jul 26, 2022
1 parent 85d2b62 commit 4a85bc3
Show file tree
Hide file tree
Showing 7 changed files with 5,424 additions and 32 deletions.
12 changes: 12 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
### What

### Why


### How


### Things to note


### Screenshot
38 changes: 18 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,35 @@
# build-notifier

Github Action for build notifications

### Parameters:

- **slackbot_secret:** - Slackbot app secret - This is a org level github secret `PICO_THE_BUILDER_SLACKBOT_SECRET`. Ask platform if it's not in your repo

- **slackbot_token:** - slackbot app oath token - This is a org level github secret `PICO_THE_BUILDER_SLACKBOT_TOKEN`. Ask platform if it's not in your repo
- **slackbot_secret:** - Slackbot app secret - This is a org level github secret `PICO_THE_BUILDER_SLACKBOT_SECRET`. Ask platform if it's not in your repo

- **slackbot_channel:** - Slack channel for the notification to be posted to. You can find this at the bottom of the "About" section of the slack channel. Example Channel ID: `C0198QJ6FP0`
- **slackbot_token:** - slackbot app oath token - This is a org level github secret `PICO_THE_BUILDER_SLACKBOT_TOKEN`. Ask platform if it's not in your repo

- **build_number:** - The Build number of the application being built
- **slackbot_channel:** - Slack channel for the notification to be posted to. You can find this at the bottom of the "About" section of the slack channel. Example Channel ID: `C0198QJ6FP0`

- **build_version:** - The Version number of the application being built
- **app_name:** - The name of the app being built. Acceptable values are ["services", "music_stand", "church_center_app", "check_ins", "headcounts", "people"]

- **build_type:** - The type of build - Acceptable values are ["playstore", "appstore", "firebase", "test", "ios", "android"]

- **notes:** - Additional optional notes
- **build_number:** - The Build number of the application being built

- **status:** - The status of the build - default: 'working' - acceptable values: ["success", "failure", "working", "cancelled"]

- **github_token:** - The github actor token

- **ts:** - ID of slack thread 'The slack thread' - this app will populate this value and you don't need to provide it as long as you pass a `config`
- **build_version:** - The Version number of the application being built

- **config:** - As a way to pass values from one notify step to another, we use a config value as the output of a previous step. This config passes all the input values above that are sent and you can override any value in the config by passing it in as an input to a future step. Example: `config: ${{ steps.notify.outputs.config }}`
- **build_type:** - The type of build - Acceptable values are ["playstore", "appstore", "firebase", "test", "ios", "android"]
- **notes:** - Additional optional notes

### Example Github Action Workflow Usage:
- **status:** - The status of the build - default: 'working' - acceptable values: ["success", "failure", "working", "cancelled"]
- **github_token:** - The github actor token
- **ts:** - ID of slack thread 'The slack thread' - this app will populate this value and you don't need to provide it as long as you pass a `config`

- **config:** - As a way to pass values from one notify step to another, we use a config value as the output of a previous step. This config passes all the input values above that are sent and you can override any value in the config by passing it in as an input to a future step. Example: `config: ${{ steps.notify.outputs.config }}`

### Example Github Action Workflow Usage:

- name: notify
id: notify
uses: planningcenter/[email protected].8
uses: planningcenter/[email protected].9
with:
build_number: ${{ steps.build_step.outputs.build_number }}
build_version: ${{ steps.version_step.outputs.version }}
Expand All @@ -43,16 +42,15 @@ Github Action for build notifications


- name: notify-success
uses: planningcenter/[email protected].8
uses: planningcenter/[email protected].9
with:
status: 'success'
config: ${{ steps.notify.outputs.config }}

- name: notify-failure
if: failure() || cancelled()
uses: planningcenter/[email protected].8
uses: planningcenter/[email protected].9
with:
status: ${{ job.status }}
notes: 'Check details on Github.'
config: ${{ steps.notify.outputs.config }}

Loading

0 comments on commit 4a85bc3

Please sign in to comment.