Merge pull request #39 from impresscms-dev/dependabot/npm_and_yarn/je… #3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Autoupdate code | |
| on: | |
| push: | |
| branches: | |
| - main | |
| concurrency: | |
| group: 'autobuild' | |
| cancel-in-progress: true | |
| permissions: | |
| contents: write | |
| jobs: | |
| prepare: | |
| name: Prepare | |
| runs-on: ubuntu-latest | |
| outputs: | |
| date: ${{ steps.date.outputs.date }} | |
| steps: | |
| - name: Get current date | |
| id: date | |
| run: echo "date=$(date -u +'%Y-%m-%d %H:%M UTC')" >> $GITHUB_OUTPUT | |
| update-and-commit: | |
| name: ${{ matrix.name }} and Commit | |
| needs: prepare | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| include: | |
| - operation: lint:fix | |
| name: Lint Fix | |
| description: "Lint Autofix" | |
| - operation: pack | |
| name: Update dist folder | |
| description: "Rebuild the distribution files" | |
| max-parallel: 1 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.IMPRESSBOT_TOKEN }} | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Run ${{ matrix.operation }} | |
| run: npm run ${{ matrix.operation }} | |
| - name: Commit and push if changes exist | |
| uses: stefanzweifel/git-auto-commit-action@v6 | |
| with: | |
| commit_message: "${{ matrix.name }} ${{ needs.prepare.outputs.date }}" | |
| commit_user_name: ImpressBot | |
| commit_user_email: [email protected] | |
| commit_author: ImpressBot <[email protected]> |