nx icon indicating copy to clipboard operation
nx copied to clipboard

Allow the projects nx affected considers to be limited by acceptting --tags argument

Open airtonix opened this issue 3 years ago • 0 comments

Description

run deploy target for all affected projects who are tag with either app or service

$ nx affected --target=deploy --tag=app --tag=service

run deploy target for all affected projects who are tag with both finance and service

$ nx affected --target=deploy --tags=finance,service

Motivation

name: Build and Release all changed Desktop Apps

on:
  push:
    branch:
      - master


concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

jobs:
  Release:
    name: Release Packages and Changelogs


    steps:
      - uses: actions/checkout@v3
        with:
          # We need to fetch all branches and commits so that Nx affected has a base to compare against.
          fetch-depth: 0
          persist-credentials: false


      - name: Derive appropriate SHAs for base and head for `nx affected` commands
        uses: nrwl/nx-set-shas@v2
        with:
          main-branch-name: master

      - uses: ./pkg/ci/setup-tooling
        with:
          SetupCommand: ./setup.sh

      - uses: ./pkg/ci/setup-yarn

      - uses: ./pkg/ci/setup-node-ghpr
        with:
          NodeAuthToken: ${{secrets.BOT_TOKEN}}

      - run: just nx affected --target=release --tags=app,desktop
        env:
          GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
          GIT_AUTHOR_EMAIL: ${{secrets.BOT_GIT_EMAIL}}
          GIT_AUTHOR_NAME: ${{secrets.BOT_GIT_NAME}}
          GIT_COMMITTER_EMAIL: ${{secrets.BOT_GIT_EMAIL}}
          GIT_COMMITTER_NAME: ${{secrets.BOT_GIT_NAME}}

Suggested Implementation

no idea

Alternate Implementations

not interested in alternatives.

airtonix avatar Aug 06 '22 11:08 airtonix