Skip to content

Commit f333770

Browse files
committed
👷 domain list actions
1 parent cde43e9 commit f333770

File tree

10 files changed

+2363
-2
lines changed

10 files changed

+2363
-2
lines changed
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: 'Store Domain List'
2+
description: 'Write domain list from repository dispatch events'
3+
4+
inputs:
5+
bot-email:
6+
description: 'Email for git config'
7+
default: '41898282+github-actions[bot]@users.noreply.github.com'
8+
bot-name:
9+
description: 'Name for git config'
10+
default: 'GitHub Action'
11+
commit-message:
12+
description: 'Commit message'
13+
default: '📋 Auto-update domain list'
14+
branch:
15+
description: 'Branch to push to'
16+
default: 'main'
17+
vote_actions_release:
18+
description: published version of shared actions
19+
required: false
20+
default: snapshot
21+
22+
list_dir:
23+
description: 'Directory to store reports'
24+
required: false
25+
default: 'checklists'
26+
calendar_dir:
27+
description: 'Break domain expiry into annual files'
28+
required: false
29+
30+
domain_list:
31+
description: 'JSON object containing domain list'
32+
required: true
33+
34+
outputs:
35+
updated:
36+
description: True if changes where made
37+
value: ${{ steps.commit_push.outputs.updated }}
38+
39+
runs:
40+
using: "composite"
41+
steps:
42+
- name: Setup environment
43+
uses: ./actions/setup-action-environment
44+
with:
45+
bot-email: ${{ inputs.bot-email }}
46+
bot-name: ${{ inputs.bot-name }}
47+
vote_actions_release: ${{ inputs.vote_actions_release }}
48+
49+
- name: Process domain data
50+
shell: bash
51+
env:
52+
GITHUB_TOKEN: ${{ github.token }}
53+
CALENDAR: ${{ inputs.calendar_dir }}
54+
LIST: ${{ inputs.list_dir }}
55+
DOMAIN_LIST: ${{ inputs.domain_list }}
56+
run: |
57+
node vote-record-actions/dist/domainsWriteList.js
58+
git add "${LIST}"
59+
60+
if [ -n "${CALENDAR}" ]; then
61+
node vote-record-actions/dist/domainsUpdateCalendars.js
62+
git add "${CALENDAR}"
63+
fi
64+
65+
- name: Commit and push changes
66+
id: commit_push
67+
uses: ./actions/commit-and-push
68+
with:
69+
commit-message: ${{ inputs.commit-message }}
70+
branch: ${{ inputs.branch }}

‎esbuild.config.mjs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import esbuild from "esbuild";
22

33
esbuild.build({
4-
entryPoints: ['./src/genIndex.ts', './src/votes.ts', './src/newProjects.ts', './src/healthReports.ts'],
4+
entryPoints: ['./src/genIndex.ts', './src/votes.ts', './src/newProjects.ts', './src/healthReports.ts', './src/domainsWriteList.ts', './src/domainsUpdateCalendars.ts'],
55
bundle: true,
66
outdir: './dist',
77
platform: 'node',

0 commit comments

Comments
 (0)