File tree Expand file tree Collapse file tree 6 files changed +47
-3
lines changed Expand file tree Collapse file tree 6 files changed +47
-3
lines changed Original file line number Diff line number Diff line change
1
+ name : random-tale-of-kieu
2
+
3
+ on :
4
+ # Run automatically everyday at 00:05
5
+ # schedule:
6
+ # - cron: "5 0 * * *"
7
+
8
+ # Allows to manually run the job at any time
9
+ workflow_dispatch :
10
+ # Run on every push or pull request on main branch
11
+ push :
12
+ branches : [ "main" ]
13
+
14
+ permissions :
15
+ contents : write
16
+
17
+ # Only a single workflow in the same concurrency will run at the same time
18
+ concurrency :
19
+ group : ' ${{ github.workflow }} @ ${{ github.head_ref || github.ref }}'
20
+ cancel-in-progress : true
21
+
22
+ jobs :
23
+ generate_wallpaper :
24
+ name : Get the random sentence from The Tale of Kieu - Nguyen Du
25
+ runs-on : ubuntu-latest
26
+
27
+ steps :
28
+ # Checkout the main branch
29
+ - uses : actions/checkout@v4
30
+
31
+ # Uses action in the root directory to get random Tale of Kieu
32
+ - name : The random tale of Kieu
33
+ uses : ./
34
+
35
+ # Push the random Tale of Kieu to main branch
36
+ # Note: the following account information will not work on GHES
37
+ - name : Push the random Tale of Kieu to main branch
38
+ run : |
39
+ git config user.name "github-actions[bot]"
40
+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
41
+ git add .
42
+ git commit -m ":robot: The random Tale of Kieu [skip ci]"
43
+ git push
Original file line number Diff line number Diff line change 1
- # random-tale-of-kieu
2
- Random from The Tale of Kieu - Nguyen Du
1
+ # Get the random sentence from The Tale of Kieu - Nguyen Du
2
+
3
+ Random sentence from The Tale of Kieu - Nguyen Du
3
4
4
5
<div align =" center " >
5
6
<!-- START_POEM -->
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change 1
1
import { readFile , writeFile } from 'node:fs/promises'
2
2
import { resolve } from 'node:path'
3
3
import * as core from '@actions/core'
4
- import { default as kieu } from './truyen-kieu-1871.json'
4
+ import { default as kieu } from '../assets /truyen-kieu-1871.json'
5
5
6
6
interface doublePoem {
7
7
line : number
You can’t perform that action at this time.
0 commit comments