From 8f1f8baa81fd75c89ea95063c3053e2b005aaca4 Mon Sep 17 00:00:00 2001 From: Alexander Date: Tue, 6 Oct 2020 12:34:06 +1300 Subject: [PATCH 01/32] Add alex.is-a-dev --- domains/alex.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 domains/alex.json diff --git a/domains/alex.json b/domains/alex.json new file mode 100644 index 0000000000..1dcc6554be --- /dev/null +++ b/domains/alex.json @@ -0,0 +1,12 @@ +{ + "description": "Alex's personal developer website", + "repo": "https://github.com/alexmorrisnz", + "owner": { + "username": "alexmorrisnz", + "email": "alex@navra.nz" + }, + "record": { + "CNAME": "alexmorris.nz", + "URL": "https://alex.is-a.dev" + } +} From 5675fba1fecda42a77c9473144bf06a818d019ca Mon Sep 17 00:00:00 2001 From: Yoandy Rodriguez Martinez Date: Mon, 5 Oct 2020 23:58:29 -0400 Subject: [PATCH 02/32] Register domain for user yorodm --- domains/yorodm.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 domains/yorodm.json diff --git a/domains/yorodm.json b/domains/yorodm.json new file mode 100644 index 0000000000..f9ab3862cb --- /dev/null +++ b/domains/yorodm.json @@ -0,0 +1,12 @@ +{ + "description": "/home/yorodm", + "repo": "https://github.com/user/yorodm.github.io", + "owner": { + "username": "yorodm", + "email": "yoandy.rmartinez@gmail.com" + }, + "record": { + "CNAME": "yorodm.github.io", + "URL": "https://yorodm.is-a.dev" + } +} From 544788ae1fb3744d45ca4b63ea347e544385fa32 Mon Sep 17 00:00:00 2001 From: Abhinav Dalal Date: Tue, 6 Oct 2020 09:37:15 +0530 Subject: [PATCH 03/32] added abhinavdalal.json --- domains/abhinavdalal.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 domains/abhinavdalal.json diff --git a/domains/abhinavdalal.json b/domains/abhinavdalal.json new file mode 100644 index 0000000000..6a33e5fd95 --- /dev/null +++ b/domains/abhinavdalal.json @@ -0,0 +1,12 @@ +{ + "description": "Abhinav Dalal's website", + "repo": "https://github.com/b-om/b-om.github.io", + "owner": { + "username": "abhinavdalal", + "email": "abhinavdalal@gmail.com" + }, + "record": { + "CNAME": "https://b-om.github.io/who-we-are.html", + "URL": "https://abhinavdalal.is-a.dev" + } +} From a22b21eee92b1f2954f5336713e5aee6335d4ba6 Mon Sep 17 00:00:00 2001 From: Abhinav Dalal Date: Tue, 6 Oct 2020 10:25:44 +0530 Subject: [PATCH 04/32] fixed cname error --- domains/abhinavdalal.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/domains/abhinavdalal.json b/domains/abhinavdalal.json index 6a33e5fd95..b6cc7b99cf 100644 --- a/domains/abhinavdalal.json +++ b/domains/abhinavdalal.json @@ -6,7 +6,7 @@ "email": "abhinavdalal@gmail.com" }, "record": { - "CNAME": "https://b-om.github.io/who-we-are.html", + "CNAME": "b-om.github.io", "URL": "https://abhinavdalal.is-a.dev" } } From 33b8dbe34211cd7381b011f7005ce336f58ce7ee Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Tue, 6 Oct 2020 10:26:28 +0530 Subject: [PATCH 05/32] Update domains/yorodm.json --- domains/yorodm.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/domains/yorodm.json b/domains/yorodm.json index f9ab3862cb..2c4e81a6d8 100644 --- a/domains/yorodm.json +++ b/domains/yorodm.json @@ -1,6 +1,6 @@ { "description": "/home/yorodm", - "repo": "https://github.com/user/yorodm.github.io", + "repo": "https://github.com/yorodm/yorodm.github.io", "owner": { "username": "yorodm", "email": "yoandy.rmartinez@gmail.com" From 6e3a31d5c7b7c94cab3774cce50cf09cbfc03fe5 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Tue, 6 Oct 2020 10:38:52 +0530 Subject: [PATCH 06/32] fixes garlic-os redirection --- domains/garlic-os.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/domains/garlic-os.json b/domains/garlic-os.json index 059a2b09a8..5cc8585dd2 100644 --- a/domains/garlic-os.json +++ b/domains/garlic-os.json @@ -7,6 +7,6 @@ }, "record": { "CNAME": "the-garlic-os.github.io", - "URL": "https://the-garlic-os.is-a.dev" + "URL": "https://garlic-os.is-a.dev" } } From ca11de4e034f7e9d04a9a487eb0924e992b68e03 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Tue, 6 Oct 2020 11:06:09 +0530 Subject: [PATCH 07/32] Update API.md --- API.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/API.md b/API.md index 288dcb7f64..cd14511c20 100644 --- a/API.md +++ b/API.md @@ -22,6 +22,8 @@ Example (for github pages) - } ``` +NOTE: For github pages users, to fix the 404 you get after registering the domain, add `your-domain.is-a.dev` to your github pages repo in Settings > Github pages > Custom domain. + ## Domains json file The way you register your own domain name is through a pull request. From ca5bcbfaf11310176d39c78d2f7f977c54caf803 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Tue, 6 Oct 2020 14:00:31 +0530 Subject: [PATCH 08/32] Create CONTRIBUTING.md --- CONTRIBUTING.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000000..2a3e7da99c --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,24 @@ +# Contributing +When contributing to this repository, please first discuss the change you wish to make via issue before making a change. + +You should also read up on this project's [code of conduct](./CODE_OF_CONDUCT.md) + +## Pull requests +You can create an pull request for the following reasons - +* Adding, changing or removing a domain file you own +* Fixing a bug in the scripts or CI +* Fix an error in the documentation + +#### Domains +Changes to domain files will follow the given process - +* PR will be reviewed and merged to `main` branch +* Currently, the publishing of records is done manually. This will be automated soon with releases +* The changes should reflect soon after publishing + + +## Issues +* **Report an abusive domain** - Create a new issue with the label `report-abuse` +* **Report a problem with your domain** - Create a new issue with the label `support` +* **Suggestions** - Create a new issue with the label `suggestion` +* **For any questions** - Create a new issue with the label `question` +* **Report any other issues related to this repository** - Create a new issue with any label that fits From 12e42fa43867cd76027f0e9563d52548c38bbf88 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Tue, 6 Oct 2020 18:43:15 +0530 Subject: [PATCH 09/32] Adds issue templates --- .github/ISSUE_TEMPLATE/bug.md | 8 ++++++++ .github/ISSUE_TEMPLATE/questions.md | 10 ++++++++++ .github/ISSUE_TEMPLATE/report-abuse.md | 13 +++++++++++++ .github/ISSUE_TEMPLATE/suggestions.md | 8 ++++++++ .github/ISSUE_TEMPLATE/support.md | 12 ++++++++++++ 5 files changed, 51 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug.md create mode 100644 .github/ISSUE_TEMPLATE/questions.md create mode 100644 .github/ISSUE_TEMPLATE/report-abuse.md create mode 100644 .github/ISSUE_TEMPLATE/suggestions.md create mode 100644 .github/ISSUE_TEMPLATE/support.md diff --git a/.github/ISSUE_TEMPLATE/bug.md b/.github/ISSUE_TEMPLATE/bug.md new file mode 100644 index 0000000000..82b034bf50 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug.md @@ -0,0 +1,8 @@ +--- +name: bug +about: Use this template to report any bugs you've encountered related to the project +title: 'Bug' +labels: bug + +--- + diff --git a/.github/ISSUE_TEMPLATE/questions.md b/.github/ISSUE_TEMPLATE/questions.md new file mode 100644 index 0000000000..26b185b1ac --- /dev/null +++ b/.github/ISSUE_TEMPLATE/questions.md @@ -0,0 +1,10 @@ +--- +name: question +about: Use this template to ask any questions about the service +title: 'Question' +labels: question + +--- + +#### What is your question? + diff --git a/.github/ISSUE_TEMPLATE/report-abuse.md b/.github/ISSUE_TEMPLATE/report-abuse.md new file mode 100644 index 0000000000..f6d0152ffa --- /dev/null +++ b/.github/ISSUE_TEMPLATE/report-abuse.md @@ -0,0 +1,13 @@ +--- +name: report-abuse +about: Use this template to report abusive domains +title: 'Report abuse' +labels: report-abuse + +--- + +**Domain you want to report**: + +### Reason +Explain why you think this domain is being abused + diff --git a/.github/ISSUE_TEMPLATE/suggestions.md b/.github/ISSUE_TEMPLATE/suggestions.md new file mode 100644 index 0000000000..f4599a74ce --- /dev/null +++ b/.github/ISSUE_TEMPLATE/suggestions.md @@ -0,0 +1,8 @@ +--- +name: suggestion +about: Use this template for feedbacks and suggestions +title: 'Suggestion' +labels: suggestion + +--- + diff --git a/.github/ISSUE_TEMPLATE/support.md b/.github/ISSUE_TEMPLATE/support.md new file mode 100644 index 0000000000..9a8926bfe4 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/support.md @@ -0,0 +1,12 @@ +--- +name: support +about: Use this template if you need any support with your domain +title: 'Support' +labels: support + +--- + +**Your domain name**: + +Explain any issues you are facing + From cbe9bdbf1e2625042354e0ba1a1bd2d013af0346 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Tue, 6 Oct 2020 19:00:35 +0530 Subject: [PATCH 10/32] Updates issue templates --- .github/ISSUE_TEMPLATE/bug.md | 8 +++++++- .github/ISSUE_TEMPLATE/questions.md | 4 ++-- .github/ISSUE_TEMPLATE/report-abuse.md | 2 +- .github/ISSUE_TEMPLATE/suggestions.md | 2 +- .github/ISSUE_TEMPLATE/support.md | 2 +- 5 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug.md b/.github/ISSUE_TEMPLATE/bug.md index 82b034bf50..ef6c5eebfe 100644 --- a/.github/ISSUE_TEMPLATE/bug.md +++ b/.github/ISSUE_TEMPLATE/bug.md @@ -1,8 +1,14 @@ --- name: bug about: Use this template to report any bugs you've encountered related to the project -title: 'Bug' +title: 'What bug did you encounter?' labels: bug --- +### Expected outcome + + +### Observed outcome + + diff --git a/.github/ISSUE_TEMPLATE/questions.md b/.github/ISSUE_TEMPLATE/questions.md index 26b185b1ac..453382d05a 100644 --- a/.github/ISSUE_TEMPLATE/questions.md +++ b/.github/ISSUE_TEMPLATE/questions.md @@ -1,10 +1,10 @@ --- name: question about: Use this template to ask any questions about the service -title: 'Question' +title: 'Whats your question' labels: question --- -#### What is your question? +You can elaborate here diff --git a/.github/ISSUE_TEMPLATE/report-abuse.md b/.github/ISSUE_TEMPLATE/report-abuse.md index f6d0152ffa..3924deedce 100644 --- a/.github/ISSUE_TEMPLATE/report-abuse.md +++ b/.github/ISSUE_TEMPLATE/report-abuse.md @@ -6,7 +6,7 @@ labels: report-abuse --- -**Domain you want to report**: +Domain you want to report: ### Reason Explain why you think this domain is being abused diff --git a/.github/ISSUE_TEMPLATE/suggestions.md b/.github/ISSUE_TEMPLATE/suggestions.md index f4599a74ce..514629d2d5 100644 --- a/.github/ISSUE_TEMPLATE/suggestions.md +++ b/.github/ISSUE_TEMPLATE/suggestions.md @@ -1,7 +1,7 @@ --- name: suggestion about: Use this template for feedbacks and suggestions -title: 'Suggestion' +title: 'Feedback/suggestion' labels: suggestion --- diff --git a/.github/ISSUE_TEMPLATE/support.md b/.github/ISSUE_TEMPLATE/support.md index 9a8926bfe4..1f305dfdd3 100644 --- a/.github/ISSUE_TEMPLATE/support.md +++ b/.github/ISSUE_TEMPLATE/support.md @@ -6,7 +6,7 @@ labels: support --- -**Your domain name**: +Your domain name: Explain any issues you are facing From c3c654d3f8ed29a798a3f98a84016014b6b2600c Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Tue, 6 Oct 2020 22:14:00 +0530 Subject: [PATCH 11/32] Adds workflow files for testing --- .github/labeler.yml | 2 ++ .github/workflows/label-prs.yml | 13 +++++++++++++ .github/workflows/publish-records.yml | 11 +++++++++++ 3 files changed, 26 insertions(+) create mode 100644 .github/labeler.yml create mode 100644 .github/workflows/label-prs.yml create mode 100644 .github/workflows/publish-records.yml diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 0000000000..0016e7f9a5 --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,2 @@ +domain: + - domains/*.json diff --git a/.github/workflows/label-prs.yml b/.github/workflows/label-prs.yml new file mode 100644 index 0000000000..ef71315239 --- /dev/null +++ b/.github/workflows/label-prs.yml @@ -0,0 +1,13 @@ +# https://github.com/actions/labeler + +name: Maintainence +on: pull_request + +jobs: + label: + runs-on: ubuntu-latest + steps: + - name: Labelling pull request + uses: actions/labeler@v2 + with: + repo-token: "${{secrets.GITHUB_TOKEN}}" diff --git a/.github/workflows/publish-records.yml b/.github/workflows/publish-records.yml new file mode 100644 index 0000000000..a65fd88971 --- /dev/null +++ b/.github/workflows/publish-records.yml @@ -0,0 +1,11 @@ +name: Publish records + +on: + workflow_dispatch: + name: 'Publish all records' + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - run: echo "Hello yo" From 8563956383e07adf349f60c30ecaa2f719b211ed Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Tue, 6 Oct 2020 22:16:41 +0530 Subject: [PATCH 12/32] Renames to label to validation --- .github/workflows/{label-prs.yml => validations.yml} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename .github/workflows/{label-prs.yml => validations.yml} (92%) diff --git a/.github/workflows/label-prs.yml b/.github/workflows/validations.yml similarity index 92% rename from .github/workflows/label-prs.yml rename to .github/workflows/validations.yml index ef71315239..dfb3b146cb 100644 --- a/.github/workflows/label-prs.yml +++ b/.github/workflows/validations.yml @@ -1,6 +1,6 @@ # https://github.com/actions/labeler -name: Maintainence +name: Validations on: pull_request jobs: From be8db92d7a7f11b6afa57d038849da27b3b01e47 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Tue, 6 Oct 2020 22:19:59 +0530 Subject: [PATCH 13/32] validations changed to on pr target --- .github/workflows/validations.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/validations.yml b/.github/workflows/validations.yml index dfb3b146cb..fc40d97aa3 100644 --- a/.github/workflows/validations.yml +++ b/.github/workflows/validations.yml @@ -1,7 +1,7 @@ # https://github.com/actions/labeler name: Validations -on: pull_request +on: [pull_request_target] jobs: label: From 0051bff6b5d74525ad873db8d34997f155f22ac3 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Tue, 6 Oct 2020 22:27:19 +0530 Subject: [PATCH 14/32] Adds test running from action --- .github/workflows/validations.yml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/validations.yml b/.github/workflows/validations.yml index fc40d97aa3..ef6f4cb5b1 100644 --- a/.github/workflows/validations.yml +++ b/.github/workflows/validations.yml @@ -4,10 +4,20 @@ name: Validations on: [pull_request_target] jobs: + validations: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: borales/actions-yarn@v2.0.0 + with: + cmd: install + - uses: borales/actions-yarn@v2.0.0 + with: + cmd: test label: runs-on: ubuntu-latest steps: - - name: Labelling pull request - uses: actions/labeler@v2 - with: - repo-token: "${{secrets.GITHUB_TOKEN}}" + - name: Labelling pull request + uses: actions/labeler@v2 + with: + repo-token: "${{secrets.GITHUB_TOKEN}}" From e9480f635b4b3bcb457084896f6af0aeb2badd77 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Tue, 6 Oct 2020 22:30:14 +0530 Subject: [PATCH 15/32] Clean up of validations --- .github/workflows/{validations.yml => checks.yml} | 4 ++-- .github/workflows/publish-records.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) rename .github/workflows/{validations.yml => checks.yml} (93%) diff --git a/.github/workflows/validations.yml b/.github/workflows/checks.yml similarity index 93% rename from .github/workflows/validations.yml rename to .github/workflows/checks.yml index ef6f4cb5b1..fd27002d93 100644 --- a/.github/workflows/validations.yml +++ b/.github/workflows/checks.yml @@ -1,10 +1,10 @@ # https://github.com/actions/labeler -name: Validations +name: Checks on: [pull_request_target] jobs: - validations: + validation: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/publish-records.yml b/.github/workflows/publish-records.yml index a65fd88971..c110a5e48e 100644 --- a/.github/workflows/publish-records.yml +++ b/.github/workflows/publish-records.yml @@ -8,4 +8,4 @@ jobs: publish: runs-on: ubuntu-latest steps: - - run: echo "Hello yo" + - run: echo "Hello yo" From 3fcf2a7a9fed5510e3a68f3779d4a1fc5896b988 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Tue, 6 Oct 2020 22:31:59 +0530 Subject: [PATCH 16/32] Adds documentation label automation --- .github/labeler.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/labeler.yml b/.github/labeler.yml index 0016e7f9a5..2746e3fcdb 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -1,2 +1,6 @@ domain: - domains/*.json + +documentation: + - *.md + - docs/*.md From 52a034c96c3131e9faa9405c368ab2496069a641 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Tue, 6 Oct 2020 22:34:51 +0530 Subject: [PATCH 17/32] Removes circleci config file --- .circleci/config.yml | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index f76d6a46f3..0000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,10 +0,0 @@ -version: 2.1 -orbs: - node: circleci/node@4.1.0 -jobs: - build: - executor: node/default - steps: - - checkout - - run: yarn - - run: yarn test From 0db3769c8d7d5c979a4d02c87b73c522389d06b3 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Tue, 6 Oct 2020 22:35:50 +0530 Subject: [PATCH 18/32] Fixes path strings for labeler --- .github/labeler.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/labeler.yml b/.github/labeler.yml index 2746e3fcdb..1583ed54d7 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -2,5 +2,5 @@ domain: - domains/*.json documentation: - - *.md + - ./*.md - docs/*.md From cd72504dfd2c80f8603228522beeaa4ebd12b70f Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Tue, 6 Oct 2020 22:43:01 +0530 Subject: [PATCH 19/32] Testing publish secret --- .github/workflows/checks.yml | 3 ++- .github/workflows/publish-records.yml | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index fd27002d93..2494156393 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -11,7 +11,8 @@ jobs: - uses: borales/actions-yarn@v2.0.0 with: cmd: install - - uses: borales/actions-yarn@v2.0.0 + - name: Running tests + uses: borales/actions-yarn@v2.0.0 with: cmd: test label: diff --git a/.github/workflows/publish-records.yml b/.github/workflows/publish-records.yml index c110a5e48e..497c2dc62e 100644 --- a/.github/workflows/publish-records.yml +++ b/.github/workflows/publish-records.yml @@ -7,5 +7,7 @@ on: jobs: publish: runs-on: ubuntu-latest + env: + HELLO: ${{ secrets.HELLO }} steps: - - run: echo "Hello yo" + - run: echo "wow-- $HELLO" From e60fa45541e7f1eef6adb9f650feb00656e5f2dd Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Tue, 6 Oct 2020 22:49:14 +0530 Subject: [PATCH 20/32] test --- .github/workflows/publish-records.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-records.yml b/.github/workflows/publish-records.yml index 497c2dc62e..34a0ecb0f2 100644 --- a/.github/workflows/publish-records.yml +++ b/.github/workflows/publish-records.yml @@ -10,4 +10,4 @@ jobs: env: HELLO: ${{ secrets.HELLO }} steps: - - run: echo "wow-- $HELLO" + - run: python -c "print('...'.join('$HELLO'.split('o')))" From 3a72bb43ba965e2c96f4f228061fef43939e03b6 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Tue, 6 Oct 2020 22:55:05 +0530 Subject: [PATCH 21/32] Adds publish records action --- .github/workflows/publish-records.yml | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish-records.yml b/.github/workflows/publish-records.yml index 34a0ecb0f2..93a881cd7f 100644 --- a/.github/workflows/publish-records.yml +++ b/.github/workflows/publish-records.yml @@ -2,12 +2,26 @@ name: Publish records on: workflow_dispatch: - name: 'Publish all records' + name: 'Publish records' jobs: publish: runs-on: ubuntu-latest env: - HELLO: ${{ secrets.HELLO }} + NC_USER: ${{ secrets.NC_USER }} + NC_API_KEY: ${{ secrets.NC_API_KEY }} + NC_DOMAIN: ${{ secrets.NC_DOMAIN }} + IP_ADDRESS: ${{ secrets.IP_ADDRESS }} steps: - - run: python -c "print('...'.join('$HELLO'.split('o')))" + - uses: actions/checkout@v2 + - uses: borales/actions-yarn@v2.0.0 + with: + cmd: install + - name: Running tests + uses: borales/actions-yarn@v2.0.0 + with: + cmd: test + - name: Publishing records + uses: borales/actions-yarn@v2.0.0 + with: + cmd: publish-records From c95eff361363feafd714be13d77eda9e9bde1a1e Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Tue, 6 Oct 2020 23:00:57 +0530 Subject: [PATCH 22/32] Fixes no error issue for script --- scripts/register-domains.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/register-domains.js b/scripts/register-domains.js index 6d14d85de3..73186f79ab 100644 --- a/scripts/register-domains.js +++ b/scripts/register-domains.js @@ -35,7 +35,10 @@ const main = async () => { }; if (require.main === module) { - main().catch(console.error); + main().catch(e => { + console.error(e); + process.exit(1); + }); } else { module.exports = { toHostList, registerDomains }; } From 8c2e741fe8d0b13e08139ca69dc0ba84d557ba1e Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Tue, 6 Oct 2020 23:01:22 +0530 Subject: [PATCH 23/32] removes redundant test from publish action --- .github/workflows/publish-records.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/publish-records.yml b/.github/workflows/publish-records.yml index 93a881cd7f..94ef49cc5f 100644 --- a/.github/workflows/publish-records.yml +++ b/.github/workflows/publish-records.yml @@ -17,10 +17,6 @@ jobs: - uses: borales/actions-yarn@v2.0.0 with: cmd: install - - name: Running tests - uses: borales/actions-yarn@v2.0.0 - with: - cmd: test - name: Publishing records uses: borales/actions-yarn@v2.0.0 with: From b27e09c0eb65390e79988ef649bd494b887410a3 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Tue, 6 Oct 2020 23:03:24 +0530 Subject: [PATCH 24/32] Adds CI env to skip loading env file --- .github/workflows/publish-records.yml | 1 + utils/constants.js | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-records.yml b/.github/workflows/publish-records.yml index 94ef49cc5f..46e10ac515 100644 --- a/.github/workflows/publish-records.yml +++ b/.github/workflows/publish-records.yml @@ -8,6 +8,7 @@ jobs: publish: runs-on: ubuntu-latest env: + CI: '1' NC_USER: ${{ secrets.NC_USER }} NC_API_KEY: ${{ secrets.NC_API_KEY }} NC_DOMAIN: ${{ secrets.NC_DOMAIN }} diff --git a/utils/constants.js b/utils/constants.js index 0dc7aa634a..0197a6a45e 100644 --- a/utils/constants.js +++ b/utils/constants.js @@ -1,6 +1,9 @@ const path = require('path'); -const { ENV = 'sandbox' } = process.env; -require('dotenv').config({ path: path.resolve(`.env.${ENV}`) }); + +if (!process.env.CI) { + const { ENV = 'sandbox' } = process.env; + require('dotenv').config({ path: path.resolve(`.env.${ENV}`) }); +} const { NC_USER, NC_API_KEY, NC_DOMAIN, IP_ADDRESS } = process.env; From aae6f8d5030df424b8ec8c5de1666d0e0c2643a6 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Tue, 6 Oct 2020 23:05:47 +0530 Subject: [PATCH 25/32] Adds guard and few debuggers for env --- utils/constants.js | 8 ++++---- utils/domain-service.js | 5 +++++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/utils/constants.js b/utils/constants.js index 0197a6a45e..f391a09537 100644 --- a/utils/constants.js +++ b/utils/constants.js @@ -8,11 +8,11 @@ if (!process.env.CI) { const { NC_USER, NC_API_KEY, NC_DOMAIN, IP_ADDRESS } = process.env; module.exports = { + ENV, VALID_RECORD_TYPES: ['CNAME', 'A', 'ALIAS', 'URL'], NC_DOMAIN: NC_DOMAIN || 'booboo.xyz', - NC_USER: NC_USER || 'test', - NC_API_KEY: NC_API_KEY || 'fake_key', - ENV, - TTL: 5*60, + NC_USER, + NC_API_KEY, IP_ADDRESS, + TTL: 5*60, }; diff --git a/utils/domain-service.js b/utils/domain-service.js index 6a40e53b94..0831f3cb25 100644 --- a/utils/domain-service.js +++ b/utils/domain-service.js @@ -52,6 +52,11 @@ const getDomainService = ({ nc }) => { return { getHosts, setHosts, updateHosts }; }; +if (!NC_API_KEY) { + console.error('NC_API_KEY cannot be empty'); + process.exit(1); +} + const nc = new Namecheap({ user: NC_USER, key: NC_API_KEY, From ba38a089839089085812216faab1d43c5a803667 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Tue, 6 Oct 2020 23:09:24 +0530 Subject: [PATCH 26/32] Fixes env fuck up --- utils/constants.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/utils/constants.js b/utils/constants.js index f391a09537..0c0e43bfeb 100644 --- a/utils/constants.js +++ b/utils/constants.js @@ -1,7 +1,8 @@ const path = require('path'); -if (!process.env.CI) { - const { ENV = 'sandbox' } = process.env; +const { ENV = 'sandbox', CI } = process.env; + +if (!CI) { require('dotenv').config({ path: path.resolve(`.env.${ENV}`) }); } From 7b7870a400ab1da49a5740f4deabfb4fa0b27008 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Tue, 6 Oct 2020 23:12:20 +0530 Subject: [PATCH 27/32] Adds debugging statement --- utils/domain-service.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/utils/domain-service.js b/utils/domain-service.js index 0831f3cb25..269aea9423 100644 --- a/utils/domain-service.js +++ b/utils/domain-service.js @@ -57,6 +57,8 @@ if (!NC_API_KEY) { process.exit(1); } +console.log('>>>> iii', `${process.env.IP_ADDRESS}`.split('.')); + const nc = new Namecheap({ user: NC_USER, key: NC_API_KEY, From e2911e265a59cd75dc6b33524016f41ff7d08712 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Tue, 6 Oct 2020 23:14:19 +0530 Subject: [PATCH 28/32] more debugging --- utils/domain-service.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/domain-service.js b/utils/domain-service.js index 269aea9423..a8ee13f984 100644 --- a/utils/domain-service.js +++ b/utils/domain-service.js @@ -57,7 +57,7 @@ if (!NC_API_KEY) { process.exit(1); } -console.log('>>>> iii', `${process.env.IP_ADDRESS}`.split('.')); +console.log('>>>> iii', `${process.env.NC_API_KEY}`.length); const nc = new Namecheap({ user: NC_USER, From b9671709890be5e28cf2816e242455c9b74a4b90 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Tue, 6 Oct 2020 23:17:21 +0530 Subject: [PATCH 29/32] Adds ENV: production to action --- .github/workflows/publish-records.yml | 1 + utils/domain-service.js | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/publish-records.yml b/.github/workflows/publish-records.yml index 46e10ac515..17bb7bdc0a 100644 --- a/.github/workflows/publish-records.yml +++ b/.github/workflows/publish-records.yml @@ -9,6 +9,7 @@ jobs: runs-on: ubuntu-latest env: CI: '1' + ENV: production NC_USER: ${{ secrets.NC_USER }} NC_API_KEY: ${{ secrets.NC_API_KEY }} NC_DOMAIN: ${{ secrets.NC_DOMAIN }} diff --git a/utils/domain-service.js b/utils/domain-service.js index a8ee13f984..0831f3cb25 100644 --- a/utils/domain-service.js +++ b/utils/domain-service.js @@ -57,8 +57,6 @@ if (!NC_API_KEY) { process.exit(1); } -console.log('>>>> iii', `${process.env.NC_API_KEY}`.length); - const nc = new Namecheap({ user: NC_USER, key: NC_API_KEY, From 8a7999372dceb5b579277a990d119475b7cf4d7a Mon Sep 17 00:00:00 2001 From: a6n4-test-account <72449430+a6n4-test-account@users.noreply.github.com> Date: Tue, 6 Oct 2020 23:41:42 +0530 Subject: [PATCH 30/32] Update @.json --- domains/@.json | 1 + 1 file changed, 1 insertion(+) diff --git a/domains/@.json b/domains/@.json index d271671b6f..52b9663653 100644 --- a/domains/@.json +++ b/domains/@.json @@ -1,4 +1,5 @@ { + "description": "The root domain for is-a.dev website", "owner": { "username": "phenax", "email": "phenax5@gmail.com" From e05e789fa3519307ce6d95dcc777f0113e563d0c Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Tue, 6 Oct 2020 23:47:31 +0530 Subject: [PATCH 31/32] Fixes broken test suite --- package.json | 2 +- utils/constants.js | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 165904d1cb..e7f7277a11 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "1.0.0", "description": "Register *.is-a.dev domains for free", "scripts": { - "test": "jest", + "test": "ENV=test jest", "publish-records": "yarn test && node ./scripts/register-domains.js" }, "repository": { diff --git a/utils/constants.js b/utils/constants.js index 0c0e43bfeb..89a9b627fa 100644 --- a/utils/constants.js +++ b/utils/constants.js @@ -8,12 +8,14 @@ if (!CI) { const { NC_USER, NC_API_KEY, NC_DOMAIN, IP_ADDRESS } = process.env; +const IS_TEST = ENV === 'test'; + module.exports = { ENV, VALID_RECORD_TYPES: ['CNAME', 'A', 'ALIAS', 'URL'], NC_DOMAIN: NC_DOMAIN || 'booboo.xyz', - NC_USER, - NC_API_KEY, + NC_USER: IS_TEST ? 'testuser' : NC_USER, + NC_API_KEY: IS_TEST ? 'testkey' : NC_API_KEY, IP_ADDRESS, TTL: 5*60, }; From da136756b25f0bb3507ee3b745b120bd384f1c8a Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Tue, 6 Oct 2020 23:49:49 +0530 Subject: [PATCH 32/32] Labeler path changes --- .github/labeler.yml | 2 +- .github/workflows/checks.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/labeler.yml b/.github/labeler.yml index 1583ed54d7..7dc30bf5ac 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -3,4 +3,4 @@ domain: documentation: - ./*.md - - docs/*.md + - ./**/*.md diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 2494156393..e8519241f0 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -19,6 +19,6 @@ jobs: runs-on: ubuntu-latest steps: - name: Labelling pull request - uses: actions/labeler@v2 + uses: actions/labeler@main with: - repo-token: "${{secrets.GITHUB_TOKEN}}" + repo-token: "${{ secrets.GITHUB_TOKEN }}"