镜像自地址
https://github.com/betterfor/action-send-mail.git
已同步 2026-11-20 16:37:04 +00:00
Create test.yml
这个提交包含在:
76
.github/workflows/test.yml
vendored
普通文件
76
.github/workflows/test.yml
vendored
普通文件
@ -0,0 +1,76 @@
|
|||||||
|
name: Test action
|
||||||
|
|
||||||
|
# Controls when the workflow will run
|
||||||
|
on:
|
||||||
|
# Triggers the workflow on push or pull request events but only for the "main" branch
|
||||||
|
push:
|
||||||
|
branches: [ "main" ]
|
||||||
|
paths-ignore: ["README.md"]
|
||||||
|
|
||||||
|
# Allows you to run this workflow manually from the Actions tab
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
||||||
|
jobs:
|
||||||
|
# This workflow contains a single job called "build"
|
||||||
|
build:
|
||||||
|
# The type of runner that the job will run on
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
max-parallel: 1
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- subject: Plain body (attachment)
|
||||||
|
attachments: action.yml
|
||||||
|
body: |
|
||||||
|
first line
|
||||||
|
second line
|
||||||
|
- subject: HTML body (attachment)
|
||||||
|
attachments: go.mod,main.go
|
||||||
|
html_body: |
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<body>
|
||||||
|
<h1>Heading</h1>
|
||||||
|
<p>Paragraph</p>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
- subject: Plain body (Markdown)
|
||||||
|
convert_markdown: true
|
||||||
|
body: file://README.md
|
||||||
|
- subject: HTML body (Markdown)
|
||||||
|
convert_markdown: true
|
||||||
|
html_body: file://README.md
|
||||||
|
- subject: Multipart body (Markdown)
|
||||||
|
convert_markdown: true
|
||||||
|
body: file://README.md
|
||||||
|
html_body: file://README.md
|
||||||
|
|
||||||
|
# Steps represent a sequence of tasks that will be executed as part of the job
|
||||||
|
steps:
|
||||||
|
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
# Runs a single command using the runners shell
|
||||||
|
- name: Send mail
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
server_address: ${{secrets.ADDRESS_HOST}}
|
||||||
|
server_port: ${{secrets.ADDRESS_PORT}}
|
||||||
|
username: ${{secrets.USERNAME}}
|
||||||
|
password: ${{secrets.PASSWORD}}
|
||||||
|
subject: ${{matrix.body}}
|
||||||
|
body: ${{matrix.body}}
|
||||||
|
html_body: ${{matrix.html_body}}
|
||||||
|
to: ${{github.event.pusher.email}}
|
||||||
|
from: github-actions
|
||||||
|
attachments: ${{matrix.attachments}}
|
||||||
|
convert_markdown: ${{matrix.convert_markdown}}
|
||||||
|
priority: high
|
||||||
|
|
||||||
|
# Runs a set of commands using the runners shell
|
||||||
|
- name: Run a multi-line script
|
||||||
|
run: |
|
||||||
|
echo Add other actions to build,
|
||||||
|
echo test, and deploy your project.
|
||||||
在新工单中引用
屏蔽一个用户