diff --git a/actions/ci-test-ts/action.yml b/actions/ci-test-ts/action.yml index b6b0a847..c856145c 100644 --- a/actions/ci-test-ts/action.yml +++ b/actions/ci-test-ts/action.yml @@ -11,6 +11,14 @@ inputs: description: "number of commits to fetch" required: false default: "0" + check-only-affected: + description: "" + required: false + default: "false" + base-ref: + description: "" + required: false + default: main # grafana cloud inputs metrics-job-name: description: "grafana metrics job name" @@ -50,10 +58,15 @@ runs: run-install: "true" continue-on-error: true - # TODO: optimization - implement nx affected on pull request - - name: Run test + - name: Run lint + if: inputs.check-only-affected != 'true' + shell: bash + run: pnpm run lint + + - name: Run lint affected + if: inputs.check-only-affected == 'true' shell: bash - run: pnpm nx run-many --targets=test + run: pnpm run lint:affected --base=${{ inputs.base-ref }} - name: Collect metrics if: always() diff --git a/actions/cicd-build-publish-artifacts-ts/action.yml b/actions/cicd-build-publish-artifacts-ts/action.yml index 365c9c73..9afc5e79 100644 --- a/actions/cicd-build-publish-artifacts-ts/action.yml +++ b/actions/cicd-build-publish-artifacts-ts/action.yml @@ -15,6 +15,22 @@ inputs: description: "" required: false default: "false" + setup-qemu: + description: "" + required: false + default: "false" + release-assets: + description: "" + required: false + default: "bin/*" + extra-build-args: + description: "" + required: false + default: "" + extra-package-args: + description: "" + required: false + default: "" # monorepo inputs publish-monorepo-release: description: "" @@ -78,6 +94,10 @@ runs: run-install: "true" continue-on-error: true + - name: Set up qemu + if: inputs.setup-qemu == 'true' + uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0 + - name: Setup foundry if: inputs.setup-foundry == 'true' uses: foundry-rs/foundry-toolchain@cb603ca0abb544f301eaed59ac0baf579aa6aecf # v1.0.10 @@ -86,11 +106,11 @@ runs: - name: Run build shell: bash - run: pnpm nx run-many --target=build + run: pnpm run build ${{ inputs.extra-build-args }} - name: Run package shell: bash - run: pnpm nx run-many --target=package + run: pnpm run package ${{ inputs.extra-package-args }} - name: Prep release cmd if: inputs.publish-release == 'true' @@ -102,7 +122,7 @@ runs: uses: svenstaro/upload-release-action@1beeb572c19a9242f4361f4cee78f8e0d9aec5df # v2.7.0 with: repo_token: ${{ github.token }} - file: bin/* + file: ${{ inputs.release-assets }} tag: ${{ inputs.release-version }} overwrite: true file_glob: true @@ -112,7 +132,7 @@ runs: uses: svenstaro/upload-release-action@1beeb572c19a9242f4361f4cee78f8e0d9aec5df # v2.7.0 with: repo_token: ${{ github.token }} - file: ${{ inputs.monorepo-release-dir }}/${{ inputs.monorepo-release-name }}/bin/* + file: ${{ inputs.monorepo-release-dir }}/${{ inputs.monorepo-release-name }}/${{ inputs.release-assets }} tag: ${{ inputs.monorepo-release-name }}@${{ inputs.monorepo-release-version }} overwrite: true file_glob: true