Update dependency eslint to v9 (main) #1571
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
name: Pull Request | |
on: | |
pull_request: | |
branches: | |
- main | |
- develop | |
- release-* | |
concurrency: | |
group: pull-request-${{ github.head_ref }} | |
cancel-in-progress: true | |
jobs: | |
check-version: | |
if: startsWith(github.ref_name, 'renovate/') != true && github.actor != 'renovate[bot]' | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- name: Check out code | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 | |
with: | |
fetch-depth: 50 | |
- name: Fetch ${{ github.base_ref }} | |
run: git fetch --depth=1 origin ${{ github.base_ref }}:base_branch | |
- name: Override BASE_REF variable | |
run: echo "BASE_REF=base_branch" >> .env | |
- name: Check versions | |
run: yarn version check | |
generate-version: | |
if: failure() && startsWith(github.head_ref, 'issue/') || startsWith(github.head_ref, 'feature/') | |
needs: check-version | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
env: | |
APPLY_STRATEGY: ${{ startsWith(github.head_ref, 'issue/') && 'patch' || 'minor' }} | |
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | |
TURBO_TEAM: ${{ vars.TURBO_TEAM }} | |
TURBO_TELEMETRY_DISABLED: 1 | |
YARN_ENABLE_HARDENED_MODE: 0 | |
steps: | |
- name: Configure git | |
run: | | |
git config --global user.name github-actions[bot] | |
git config --global user.email 41898282+github-actions[bot]@users.noreply.github.com | |
- name: Check out code | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 | |
with: | |
fetch-depth: 50 | |
ref: ${{ github.head_ref }} | |
token: ${{ secrets.GH_ACTIONS_TOKEN }} | |
- name: Fetch ${{ github.base_ref }} | |
run: git fetch --depth=1 origin ${{ github.base_ref }}:base_branch | |
- name: Set Yarn global folder | |
env: | |
YARN_GLOBAL_FOLDER: ${{ runner.temp }}/.yarn/berry | |
run: | | |
echo "YARN_GLOBAL_FOLDER=$YARN_GLOBAL_FOLDER" >> .env | |
echo "YARN_GLOBAL_FOLDER=$YARN_GLOBAL_FOLDER" >> $GITHUB_ENV | |
- name: Setup Node.js environment | |
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4 | |
with: | |
node-version: lts/Hydrogen | |
cache: yarn | |
cache-dependency-path: '**/yarn.lock' | |
- name: Override BASE_REF variable | |
run: echo "BASE_REF=base_branch" >> .env | |
- name: Start Turbo Cache Server | |
uses: rharkor/caching-for-turbo@439abec0d28d21b192fa8817b744ffdf1ee5ac0d # v1.5 | |
with: | |
cache-prefix: ${{ vars.TURBO_CACHE_PREFIX }} | |
- name: Install dependencies | |
run: | | |
yarn install | |
yarn bootstrap | |
- name: Remove existing version strategies | |
run: rm -rf .yarn/versions || true | |
- name: Immediately bump versions | |
id: versions | |
run: echo "semver=$(yarn apply-versions --strategy ${{ env.APPLY_STRATEGY }})" >> $GITHUB_OUTPUT | |
- name: Remove all changes | |
run: git stash | |
- name: Add version strategy to changed workspaces | |
run: yarn workspaces foreach -A --no-private exec 'test $(echo $SEMVER | jq .\"$npm_package_name\") = null || yarn version ${{ env.APPLY_STRATEGY }} --deferred' | |
- name: Push | |
if: env.SEMVER != '' && env.SEMVER != '{}' | |
run: | | |
git add . | |
git commit -m "chore(version): strategy" | |
git push | |
env: | |
SEMVER: ${{ steps.versions.outputs.semver }} |