Create test.yml

这个提交包含在:
accent
2022-10-09 17:52:09 +08:00
提交者 GitHub
父节点 5462d397f3
当前提交 7d95ee1370

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.