fix: Updated the remaining Github actions to use yarn latest #84
Workflow file for this run
This file contains 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
# Job name | |
name: Application Linting | |
# When the to run the greeting | |
on: [pull_request, push] | |
# Jobs to run for the action (You can have multiple actions in one file) | |
jobs: | |
run-linters: | |
# Job display name | |
name: Running the eslint checks | |
# Runs on a Linux based OS | |
runs-on: ubuntu-latest | |
# Steps involved for this particular task | |
steps: | |
# Checks out the repository and enables the use of commands made available in the project ie npm run | |
- name: Check out Git repository | |
uses: actions/checkout@v2 | |
# Setup Nodes on the versions specified in the matrix strategy | |
- name: Set up Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 20.x | |
# Enable Corepack for Yarn | |
- name: Enable Corepack | |
run: corepack enable | |
# Set Yarn version | |
- name: Set Yarn version | |
run: yarn set version 4.2.2 | |
# Cache the yarn dependencies | |
- name: Cache yarn dependencies | |
uses: actions/cache@v2 | |
env: | |
cache-name: cache-yarn-dependencies | |
with: | |
path: | | |
.yarn/cache | |
.yarn/unplugged | |
.yarn/build-state.yml | |
.yarn/install-state.gz | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
# Install dependencies using Yarn | |
- name: Install dependencies | |
run: yarn install | |
# Run the linting action | |
- name: Run linters | |
uses: samuelmeuli/lint-action@v1 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} # Authorizes the github action via a Github token which is for this repo only (Generated automatically) | |
eslint: true # Enables eslint | |
prettier: true # Enables prettier to prettieifer the code when commiting and spots any violations | |
auto_fix: true # Auto fixes an prettier or eslint violations | |
git_name: 'TheOpenMovieDB-GraphQL-Example BOT' | |
git_email: '[email protected]' | |
commit_message: 'TheOpenMovieDB-GraphQL-Example BOT has fixed an eslint/prettier issue' # Might need removing if it causes the linting to break |