Introduction¶
Overview¶
[1] Problem: What are the context metadata.
To debug or see the contexts of any block in GitHub Actions, can use this steps to verify.
Add step in yaml like below
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: |
echo "$GITHUB_CONTEXT"
Contexts of GitHub Actions: https://docs.github.com/en/actions/learn-github-actions/contexts
Ref: StackOverflow - How to get my own github events payload json for testing github actions locally
[2] Problem: How to check the step status multiple.
Ref: https://stackoverflow.com/questions/57850553/github-actions-check-steps-status
Avoid using continue-on-error
:true
because it will yield the different outputs and the metadata.
Ref: https://github.com/community/community/discussions/15452
[3] Problem: How to configuration the Slack Messages
a) We are using the GH Action from Marketplace: https://github.com/slackapi/slack-github-action
It's implement this API: https://api.slack.com/methods/chat.postMessage
b) Scope for Bot:
Permission | Description |
---|---|
app_mentions:read | View messages that directly mention in conversations that the app is in |
channels:history | View messages and other content in public channel has been added to |
channels:read | View basic information about public channels in a workspace |
chat:write | Send messages as |
chat:write.customize | Send messages as with a customized username and avatar |
chat:write.public | Send messages to channels isn't a member of |
files:read | View files shared in channels and conversation has been added to |
files:write | Upload, edit, and delete files as |
incoming-webhook | Post messages to specific channels in Slack |
links:read | View URLs in messages |
links:write | Show previews of URLs in messages |
c) For mention users: Following this docs Formatting text for app surfaces
[4] Diffent output check bash scripts for true
false
value.
See the examples from [True False Bash Examples]
- CICD Process: https://docs.github.com/actions/automating-builds-and-tests/building-and-testing-nodejs-or-python?langId=py