Skip to content

Commit 354fb34

Browse files
committed
refactor: fix changelog email and move
1 parent e0bb6e7 commit 354fb34

File tree

2 files changed

+36
-15
lines changed

2 files changed

+36
-15
lines changed

.github/workflows/ferry.yml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -89,18 +89,3 @@ jobs:
8989
run: |
9090
curl --silent --show-error -H "X-FERRY-SECRET: ${{secrets.FERRY_SECRET}}" https://api.coursetable.com/api/catalog/refresh
9191
curl --silent --show-error -H "X-FERRY-SECRET: ${{secrets.FERRY_SECRET}}" https://api-staging.coursetable.com/api/catalog/refresh
92-
93-
- name: Find latest changelog file
94-
id: find_changelog
95-
run: echo "FILE=$(ls -t data/change_log/*.md | head -n 1)" >> $GITHUB_ENV
96-
97-
- name: Send changelog email
98-
uses: dawidd6/action-send-mail@v4
99-
with:
100-
connection_url: ${{ secrets.MAIL_CONNECTION }}
101-
from: "coursetable at yale <coursetable.at.yale@gmail.com>"
102-
to: ${{ secrets.EMAIL_RECIPIENTS }}
103-
subject: "changelog"
104-
# Use the latest changelog file as the HTML body
105-
html_body: "file://${{ env.FILE }}"
106-
convert_markdown: true
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Send Changelog Email
2+
on:
3+
workflow_dispatch:
4+
5+
workflow_run:
6+
workflows: ["Ferry Run"]
7+
types:
8+
- completed
9+
10+
jobs:
11+
send_mail:
12+
runs-on: ubuntu-latest
13+
steps:
14+
# Check out the ferry-data repo to get the latest changelog
15+
- uses: actions/checkout@v4
16+
with:
17+
repository: coursetable/ferry-data
18+
path: data
19+
ssh-key: ${{ secrets.REPO_SSH_KEY }}
20+
fetch-depth: 1
21+
22+
# Find the latest changelog file in data/change_log
23+
- name: Find latest changelog file
24+
id: find_changelog
25+
run: echo "FILE=$(ls -t data/change_log/*.md | head -n 1)" >> $GITHUB_ENV
26+
27+
# Send the email using the found file
28+
- name: Send changelog email
29+
uses: dawidd6/action-send-mail@v4
30+
with:
31+
connection_url: ${{ secrets.MAIL_CONNECTION }}
32+
from: "coursetable at yale <coursetable.at.yale@gmail.com>"
33+
to: ${{ secrets.MAIL_RECIPIENTS }}
34+
subject: "Changelog"
35+
html_body: "file://${{ env.FILE }}"
36+
convert_markdown: true

0 commit comments

Comments
 (0)