Skip to content

Reset organization #602

Reset organization

Reset organization #602

name: Reset organization
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
jobs:
reset_stock_items:
name: Reset stock_items
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
- name: Node 🧰
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Install 📦
run: |
npm install -g @commercelayer/cli
commercelayer plugins:install seeder && exit 0
exit 0
- name: Login 🔑
run: |
commercelayer applications:login \
--clientId ${{ secrets.CL_CLIENT_ID }} \
--clientSecret ${{ secrets.CL_CLIENT_SECRET }} \
--organization ${{ secrets.CL_ORGANIZATION }} \
--alias cli-admin
- name: Log 🔎
run: |
commercelayer version
commercelayer plugins
commercelayer applications:current
- name: Seed 🌱
run: commercelayer seeder:seed -b custom -n reset_stock_items -u ./packages/drop-in/seed