From 534a1a3102c7ee876faed990e3bcf3046ea87be3 Mon Sep 17 00:00:00 2001 From: andrewstech Date: Sun, 14 Apr 2024 17:20:01 +0100 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 00000000..cfe7553d --- /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: open-domains/raw + path: raw + token: ${{ secrets.BOT }} + + - uses: actions/setup-node@v4 + with: + node-version: latest + + - name: Update Data + run: node raw/scripts/update.js + + - name: Commit + uses: cpina/github-action-push-to-another-repository@main + with: + source-directory: "raw" + destination-github-username: open-domains + destination-repository-name: raw + user-email: open-domains@win11react.com + user-name: OD-BOT + commit-message: "Update Data via open-domains/register" + env: + API_TOKEN_GITHUB: ${{ secrets.BOT }}