name: Update CODEOWNERS on: push: branches: - main schedule: - cron: "0 0 1 * *" # runs on the first day of the month workflow_dispatch: # allow manual runs jobs: update-codeowners: runs-on: ubuntu-latest steps: - name: Checkout Repository uses: actions/checkout@v3 - name: Setup Node.js uses: actions/setup-node@v3 with: node-version: "18" - name: Install Dependencies run: npm install node-fetch dotenv - name: Run Generate CODEOWNERS env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: node .github/scripts/codeowners.mjs i18n - name: Commit and Push Changes run: | git config --global user.name "Patrick Kollitsch" git config --global user.email "83281+davidsneighbour@users.noreply.github.com" git add .github/CODEOWNERS git commit -m "chore(codeowners): update CODEOWNERS for i18n" || exit 0 git push