From 81394fc7178a96a191470325059b8fe41ff6b7cc Mon Sep 17 00:00:00 2001 From: William Harrison Date: Sat, 27 Jan 2024 18:27:28 +0800 Subject: [PATCH] Create raw-api.yml --- .github/workflows/raw-api.yml | 47 +++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/raw-api.yml diff --git a/.github/workflows/raw-api.yml b/.github/workflows/raw-api.yml new file mode 100644 index 000000000..5f54189bf --- /dev/null +++ b/.github/workflows/raw-api.yml @@ -0,0 +1,47 @@ +name: Raw API + +on: + push: + branches: [main] + paths: + - "domains/*" + - ".github/workflows/raw-api.yml" + + workflow_dispatch: + +concurrency: + group: ${{ github.ref }}-raw-api + cancel-in-progress: true + +jobs: + update: + name: Update + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - uses: actions/checkout@v4 + with: + repository: is-a-dev/raw-api + path: raw-api + token: ${{ secrets.BOT }} + + - uses: actions/setup-node@v4 + with: + node-version: 20.x + + - name: Update Data + run: node raw-api/scripts/update.js + + - name: Commit + uses: cpina/github-action-push-to-another-repository@main + with: + source-directory: "raw-api" + destination-github-username: is-a-dev + destination-repository-name: raw-api + user-email: is-a-dev@win11react.com + user-name: is-a-dev-bot + commit-message: "Update Data via is-a-dev/register" + env: + API_TOKEN_GITHUB: ${{ secrets.BOT }}