Skip to content

Commit

Permalink
update node ver and (possible) script vulnerability
Browse files Browse the repository at this point in the history
  • Loading branch information
SX-9 committed Feb 12, 2025
1 parent 4d8c771 commit d8b0212
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/db.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '14'
node-version: '18'

- name: Install dependencies
run: npm install
Expand All @@ -39,19 +39,22 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Download database artifact
uses: actions/download-artifact@v4
with:
name: database
path: database.json

- name: Commit and push database.json
- name: Commit and push database.json to another repository
run: |
git clone https://github.com/partofmyid/database.git db
cd db
git config --global user.name 'github-actions'
git config --global user.email '[email protected]'
git config --unset-all http.https://github.com/.extraheader
mv ../database.json .
git add database.json
git commit -m 'Update database.json'
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
6 changes: 4 additions & 2 deletions dbgen.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
const fs = require('fs');

console.log(
JSON.stringify(
require('fs').readdirSync('./domains').map(f =>
fs.readdirSync('./domains').map(f =>
[
f.split('.').slice(0, -1).join('.'), // subdomain
require(`./domains/${f}`).owner.username // owner
JSON.parse(fs.readFileSync(`./domains/${f}`, 'utf8')).owner.username // owner
]
)
)
Expand Down

0 comments on commit d8b0212

Please sign in to comment.