Created
June 19, 2024 04:00
-
-
Save jlbruno/4d7958e683c68c75bf8a578b04ef19a4 to your computer and use it in GitHub Desktop.
Revisions
-
jlbruno created this gist
Jun 19, 2024 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,42 @@ # .github/workflows/code-check.yml name: Code Check on: [push] jobs: code-check: name: Code Checks runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v4 - name: Get commit author id: get_author run: | echo "author=$(git log -1 --pretty=format:'%an')" >> $GITHUB_ENV - name: Check if author is specific user if: env.author != 'shopify[bot]' run: echo "Proceeding with the workflow because the author is not 'shopify[bot]'" - name: Cache node_modules id: cache-node-modules uses: actions/cache@v4 with: path: ~/.npm key: ${{ runner.os }}-node_modules-${{ hashFiles('**/package-lock.json') }} restore-keys: | ${{ runner.os }}-node_modules- - name: Install Shopify CLI if: steps.cache-node-modules.outputs.cache-hit != 'true' run: | npm install --no-package-lock --no-save @shopify/cli - name: Run Theme Check on changed files if: env.author != 'shopify[bot]' uses: shopify/theme-check-action@v2 with: theme_root: '.' # optional, could be './dist' token: ${{ github.token }} base: develop # flags: '--verbose'