-
Notifications
You must be signed in to change notification settings - Fork 3
55 lines (52 loc) · 1.4 KB
/
buildAndSendXSignatures.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: buildAndSendJSignatures
on:
push:
branches:
- 'master'
paths:
- 'data/X.json'
- 'templates/template.html'
env:
X_NAME: ${{ secrets._NAME }}
X_PHONE: ${{ secrets.X_PHONE }}
X_IPHONE: ${{ secrets.X_IPHONE }}
X_EMAIL: ${{ secrets.X_EMAIL }}
GH_ACTIONS_ENV: true
jobs:
build_and_send_signatures:
runs-on: ubuntu-latest
steps:
-
name: Checkout code
uses: actions/checkout@v3
-
name: Substitute marks (implicit parameters in env)
run: |
chmod u+x src/substituteMarks.sh
./src/substituteMarks.sh
-
name: Set up nodeJS
uses: actions/setup-node@v4
with:
node-version: '20.x'
-
name: Render signatures
run: |
npm install
node ./src/renderSignatures.js
-
name: Send emails
uses: dawidd6/action-send-mail@v3
with:
server_address: smtp.gmail.com
server_port: 465
secure: true
username: ${{secrets.EMAIL_USERNAME}}
password: ${{secrets.EMAIL_PASSWORD}}
subject: Actualització de firmes electròniques
to: ${{secrets.X_EMAIL}}, ${{secrets.EMAIL_USERNAME}}
from: ${{secrets.EMAIL_USERNAME}}
body: Aquest missatge ha estat auto-generat.
ignore_cert: true
attachments: ./out/*.html
priority: low