Skip to content

Send email GitHub actions (#18) #9

Send email GitHub actions (#18)

Send email GitHub actions (#18) #9

Workflow file for this run

name: Send email
on:
workflow_dispatch:
inputs:
name:
description: 'test user argument'
required: true
default: user
jobs:
send-email:
runs-on: ubuntu-latest
env:
USER: ${{github.event.inputs.name}}
steps:
- name: Check out repository code
uses: actions/checkout@v2
- name: verify input argument
run: |

Check failure on line 20 in .github/workflows/sendemail.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/sendemail.yml

Invalid workflow file

You have an error in your yaml syntax on line 20
echo "USER: $USER"
echo "github.event.inputs.name: ${{github.event.inputs.name}}"
- name: Send email
uses: dawidd6/action-send-mail@v3
with:
server_address: smtp.gmail.com
server_port: 465
secure: true
username: ${{secrets.GMAIL_USERNAME}}
password: ${{secrets.GMAIL_PASSWORD}}
subject: Github Actions job result
to: [email protected]
from: OSORI
body: Hi $USER, workflow for ${{github.repository}} completed successfully!