name: CI-update-dist on: workflow_dispatch: push: branches: - 'main' paths-ignore: - 'dist/**' permissions: contents: read jobs: update-dist: # Only run for the original DRA repository; otherwise when users create pull requests from their `main` branch # it would erroneously update `dist` on their branch (and the pull request) if: github.repository == 'actions/dependency-review-action' permissions: contents: write runs-on: ubuntu-latest steps: - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - name: Set up Node.js uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 with: node-version: 20 cache: npm - name: Install npm dependencies run: | npm clean-install - name: Build distribution run: | npm run build npm run package # Commit and push changes; has no effect if the files did not change # Important: The push event will not trigger any other workflows, see # https://github.com/stefanzweifel/git-auto-commit-action?tab=readme-ov-file#commits-made-by-this-action-do-not-trigger-new-workflow-runs - name: Commit & push changes uses: stefanzweifel/git-auto-commit-action@28e16e81777b558cc906c8750092100bbb34c5e3 # v7.0.0 with: commit_author: 'github-actions[bot] ' commit_user_name: 'github-actions[bot]' commit_user_email: 'github-actions[bot]@users.noreply.github.com' commit_message: '[bot] Update dist directory [skip ci]' file_pattern: 'dist/'