From 83486961b75e67a1e50536ecad5ac06dc7a8cec0 Mon Sep 17 00:00:00 2001 From: cgd <70825723+cupglassDEV@users.noreply.github.com> Date: Sun, 10 Nov 2024 18:56:25 +0700 Subject: [PATCH 1/8] Create formatter.yml --- .github/workflows/formatter.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/formatter.yml diff --git a/.github/workflows/formatter.yml b/.github/workflows/formatter.yml new file mode 100644 index 000000000..3310cebfc --- /dev/null +++ b/.github/workflows/formatter.yml @@ -0,0 +1,22 @@ +name: Formatter +on: + push: + branches: + - main +jobs: + format: + name: "Format" + runs-on: ubuntu-latest + steps: + - uses: actions/setup-node@v4 + with: + node-version: 20.x + - name: Run prettier + # Use -y, like npm install -y + run: npx -y prettier ./domains -w --tab-width 2 --print-width 120 + - name: Commit + run: | + git config --global user.name 'is-a.dev' + git config --global user.email 'actions@github.com' + git commit -am "Format domains" + git push From 017bc03999266d215a07ba026ffd219bf12d54dd Mon Sep 17 00:00:00 2001 From: William Harrison <87287585+wdhdev@users.noreply.github.com> Date: Sun, 10 Nov 2024 20:07:24 +0800 Subject: [PATCH 2/8] Update and rename formatter.yml to prettier.yml --- .github/workflows/formatter.yml | 22 ---------------------- .github/workflows/prettier.yml | 27 +++++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 22 deletions(-) delete mode 100644 .github/workflows/formatter.yml create mode 100644 .github/workflows/prettier.yml diff --git a/.github/workflows/formatter.yml b/.github/workflows/formatter.yml deleted file mode 100644 index 3310cebfc..000000000 --- a/.github/workflows/formatter.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Formatter -on: - push: - branches: - - main -jobs: - format: - name: "Format" - runs-on: ubuntu-latest - steps: - - uses: actions/setup-node@v4 - with: - node-version: 20.x - - name: Run prettier - # Use -y, like npm install -y - run: npx -y prettier ./domains -w --tab-width 2 --print-width 120 - - name: Commit - run: | - git config --global user.name 'is-a.dev' - git config --global user.email 'actions@github.com' - git commit -am "Format domains" - git push diff --git a/.github/workflows/prettier.yml b/.github/workflows/prettier.yml new file mode 100644 index 000000000..8f494707a --- /dev/null +++ b/.github/workflows/prettier.yml @@ -0,0 +1,27 @@ +name: Prettier + +on: + push: + branches: [main] + paths: + - "domains/*" + +jobs: + format: + name: Format + runs-on: ubuntu-latest + + steps: + - uses: actions/setup-node@v4 + with: + node-version: 20.x + + - name: Run Prettier + run: npx -y prettier ./domains -w --tab-width 2 --print-width 120 + + - name: Commit + run: | + git config --global user.email "actions@github.com" + git config --global user.name "GitHub Actions" + git commit -am "Format domains" + git push From a14a35f3090141ddfe7aeac008b7397b6ef2f5e2 Mon Sep 17 00:00:00 2001 From: cgd <70825723+cupglassDEV@users.noreply.github.com> Date: Sun, 10 Nov 2024 19:11:13 +0700 Subject: [PATCH 3/8] use github action push to whatever --- .github/workflows/prettier.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/prettier.yml b/.github/workflows/prettier.yml index 8f494707a..eb9442bcf 100644 --- a/.github/workflows/prettier.yml +++ b/.github/workflows/prettier.yml @@ -20,8 +20,12 @@ jobs: run: npx -y prettier ./domains -w --tab-width 2 --print-width 120 - name: Commit - run: | - git config --global user.email "actions@github.com" - git config --global user.name "GitHub Actions" - git commit -am "Format domains" - git push + uses: cpina/github-action-push-to-another-repository@main + with: + source-directory: "register" + destination-github-username: is-a-dev + destination-repository-name: register + user-email: actions@github.com + user-name: "GitHub Actions" + env: + API_TOKEN_GITHUB: ${{ secrets.BOT }} From 07be06fa111b2d9ef7de6c392c357b875cb6e1b5 Mon Sep 17 00:00:00 2001 From: William Harrison <87287585+wdhdev@users.noreply.github.com> Date: Sun, 10 Nov 2024 20:13:35 +0800 Subject: [PATCH 4/8] Update raw-api.yml --- .github/workflows/raw-api.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/raw-api.yml b/.github/workflows/raw-api.yml index 35680dc72..4ba2bd85d 100644 --- a/.github/workflows/raw-api.yml +++ b/.github/workflows/raw-api.yml @@ -40,7 +40,7 @@ jobs: source-directory: "raw-api" destination-github-username: is-a-dev destination-repository-name: raw-api - user-email: actions@github.com + user-email: "actions@github.com" user-name: "GitHub Actions" env: API_TOKEN_GITHUB: ${{ secrets.BOT }} From 670af4f62efa88a1a48ca55125f807d2628731f2 Mon Sep 17 00:00:00 2001 From: William Harrison <87287585+wdhdev@users.noreply.github.com> Date: Sun, 10 Nov 2024 20:13:56 +0800 Subject: [PATCH 5/8] Update prettier.yml --- .github/workflows/prettier.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/prettier.yml b/.github/workflows/prettier.yml index eb9442bcf..bd00c134d 100644 --- a/.github/workflows/prettier.yml +++ b/.github/workflows/prettier.yml @@ -25,7 +25,7 @@ jobs: source-directory: "register" destination-github-username: is-a-dev destination-repository-name: register - user-email: actions@github.com + user-email: "actions@github.com" user-name: "GitHub Actions" env: API_TOKEN_GITHUB: ${{ secrets.BOT }} From 0a8af169daab9d3d8051bec293570daabc8911fa Mon Sep 17 00:00:00 2001 From: William Harrison <87287585+wdhdev@users.noreply.github.com> Date: Sun, 10 Nov 2024 20:15:22 +0800 Subject: [PATCH 6/8] Update prettier.yml --- .github/workflows/prettier.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/prettier.yml b/.github/workflows/prettier.yml index bd00c134d..f555d457e 100644 --- a/.github/workflows/prettier.yml +++ b/.github/workflows/prettier.yml @@ -5,6 +5,7 @@ on: branches: [main] paths: - "domains/*" + - ".github/workflows/prettier.yml" jobs: format: From db52535770fe53073c06a5f3219f009c04b600f2 Mon Sep 17 00:00:00 2001 From: William Harrison <87287585+wdhdev@users.noreply.github.com> Date: Sun, 10 Nov 2024 20:17:01 +0800 Subject: [PATCH 7/8] Update prettier.yml --- .github/workflows/prettier.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/prettier.yml b/.github/workflows/prettier.yml index f555d457e..4379c24c7 100644 --- a/.github/workflows/prettier.yml +++ b/.github/workflows/prettier.yml @@ -17,8 +17,10 @@ jobs: with: node-version: 20.x + - run: ls + - name: Run Prettier - run: npx -y prettier ./domains -w --tab-width 2 --print-width 120 + run: npx -y prettier domains/*.json -w --tab-width 2 --print-width 120 - name: Commit uses: cpina/github-action-push-to-another-repository@main From 4df3d9afd29ccc216888295ae64eb0e5ee22b283 Mon Sep 17 00:00:00 2001 From: William Harrison <87287585+wdhdev@users.noreply.github.com> Date: Sun, 10 Nov 2024 20:18:22 +0800 Subject: [PATCH 8/8] add checkout --- .github/workflows/prettier.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/prettier.yml b/.github/workflows/prettier.yml index 4379c24c7..f67a561c4 100644 --- a/.github/workflows/prettier.yml +++ b/.github/workflows/prettier.yml @@ -13,14 +13,14 @@ jobs: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: 20.x - - run: ls - - name: Run Prettier - run: npx -y prettier domains/*.json -w --tab-width 2 --print-width 120 + run: npx -y prettier ./domains -w --tab-width 2 --print-width 120 - name: Commit uses: cpina/github-action-push-to-another-repository@main