Skip to content

Commit

Permalink
[skip ci] add GitHub Action config sample
Browse files Browse the repository at this point in the history
  • Loading branch information
timfanda35 committed Oct 1, 2022
1 parent c2cc59b commit 1246628
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,40 @@ References:

- [Webhook Resource](https://discord.com/developers/docs/resources/webhook#execute-webhook)


## GitHub Action Config Sample

Set the required environment variables in GitLab `Settings -> Secrets -> Acctions` page.

- `NOTIFY_TELEGRAM_TOKEN`
- `NOTIFY_TELEGRAM_CHAT_ID`

```
name: CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Notify
run: |
docker run \
-e NOTIFY_TELEGRAM_TOKEN="${{ secrets.NOTIFY_TELEGRAM_TOKEN }}" \
-e NOTIFY_TELEGRAM_CHAT_ID="${{ secrets.NOTIFY_TELEGRAM_CHAT_ID }}" \
ghcr.io/timfanda35/simple-channel-notify \
telegram --message="Notify Message~~~"
```

Reference: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions

## GitLab CI Config Sample

Set the required environment variables in GitLab `Settings -> CI/CD -> Variables` page.
Expand Down

0 comments on commit 1246628

Please sign in to comment.