GitHub Action which sends notification emails for Tech Writers
To use this action, create a YAML file in the directory .github/workflows
with such like contents:
name: Tech Writer Notify
on:
push:
branches: [ master ]
jobs:
tech_writer_notify:
runs-on: ubuntu-latest
env:
PROJECT: ${{ github.repository }}
SENDER_EMAIL: [email protected]
RECIPIENT_EMAIL: [email protected]
MAILGUN_API_TOKEN: ${{ secrets.MAILGUN_API_TOKEN }}
MAILGUN_MAILBOX: ${{ secrets.MAILGUN_MAILBOX }}
if: github.repository == 'ePages-de/example'
steps:
- name: Checkout microservice
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Run Tech Writer notification
uses: ePages-de/tech-writer-notify@master
docker build -t tech-writer-notify .
export MAILGUN_API_TOKEN=*******
export MAILGUN_MAILBOX=*******
./lib/tech-writer-notify.sh -s [email protected] -r [email protected] -p example/repo -g $YOUR_REPO_HERE
cd $YOUR_REPO_HERE
docker run -ti --rm \
-v $(pwd):/github/workspace \
--workdir="/github/workspace" \
--env PROJECT=example/repo \
--env [email protected] \
--env [email protected] \
--env MAILGUN_API_TOKEN=xxxx \
--env MAILGUN_MAILBOX=example.com \
tech-writer-notify