From 472aeb1b4bf4bf5fbd949e76fa69611077daa67f Mon Sep 17 00:00:00 2001 From: Vladimir Antropov Date: Mon, 25 Nov 2024 17:25:52 +0100 Subject: [PATCH] Merge to v4 2024 11 25 (#76) merge v4-beta to v4 --- .github/workflows/node-simple-pnpm.yaml | 46 ++++++++++++++----------- actions/node/prepare/action.yaml | 2 +- blocks/node/build/generic/action.yaml | 2 +- blocks/node/test/action.yaml | 4 +++ blocks/update-cdn-link/action.yaml | 2 +- 5 files changed, 32 insertions(+), 24 deletions(-) diff --git a/.github/workflows/node-simple-pnpm.yaml b/.github/workflows/node-simple-pnpm.yaml index ba2238f4..7c65c1bf 100644 --- a/.github/workflows/node-simple-pnpm.yaml +++ b/.github/workflows/node-simple-pnpm.yaml @@ -31,11 +31,6 @@ on: # # Checkout settings # - changed-files-list: - description: | - File/Directory names to check for uncommited changes. - type: string - required: false checkout-submodules: description: | 'Submodules' mode for 'actions/checkout' action @@ -45,6 +40,7 @@ on: type: string required: false default: '' + # # Environment settings # @@ -91,6 +87,13 @@ on: required: false default: 'pnpm-lock.yaml' + team-id: + description: | + The Team ID to use. This controls the directory where turbo cache entries will be saved + type: string + required: false + default: 'ci' + # # PNPM settings # @@ -318,7 +321,7 @@ jobs: steps: - id: context - uses: milaboratory/github-ci/actions/context@v4 + uses: milaboratory/github-ci/actions/context@v4-beta outputs: is-release: ${{ steps.context.outputs.is-release }} @@ -336,7 +339,7 @@ jobs: submodules: ${{ inputs.checkout-submodules }} - id: npm-pkg-metadata - uses: milaboratory/github-ci/actions/shell@v4 + uses: milaboratory/github-ci/actions/shell@v4-beta with: run: | NPM_PKG_VERSION="$(cat "${GITHUB_WORKSPACE}/package.json" | jq --raw-output '.version')" @@ -357,9 +360,9 @@ jobs: steps: - id: context - uses: milaboratory/github-ci/actions/context@v4 + uses: milaboratory/github-ci/actions/context@v4-beta - - uses: milaboratory/github-ci/actions/env@v4 + - uses: milaboratory/github-ci/actions/env@v4-beta with: inputs: ${{ inputs.env }} secrets: ${{ secrets.env }} @@ -370,7 +373,7 @@ jobs: fetch-depth: '0' - name: Prepare environment for building a NodeJS application - uses: milaboratory/github-ci/actions/node/prepare-pnpm@v4 + uses: milaboratory/github-ci/actions/node/prepare-pnpm@v4-beta env: PNPM_VERSION: ${{ needs.metadata.outputs.pnpm-version }} with: @@ -381,13 +384,13 @@ jobs: npmrc-config: ${{ inputs.npmrc-config }} - name: Install NodeJS packages with pnpm - uses: milaboratory/github-ci/actions/shell@v4 + uses: milaboratory/github-ci/actions/shell@v4-beta with: run: | pnpm install --frozen-lockfile --prefer-offline - name: Check for Changesets - uses: milaboratory/github-ci/actions/shell@v4 + uses: milaboratory/github-ci/actions/shell@v4-beta env: BRANCH_NAME: ${{ inputs.changeset-default-branch }} with: @@ -411,9 +414,9 @@ jobs: steps: - id: context - uses: milaboratory/github-ci/actions/context@v4 + uses: milaboratory/github-ci/actions/context@v4-beta - - uses: milaboratory/github-ci/actions/env@v4 + - uses: milaboratory/github-ci/actions/env@v4-beta with: inputs: ${{ inputs.env }} secrets: ${{ secrets.env }} @@ -445,9 +448,10 @@ jobs: with: storage-provider: 's3' storage-path: ${{ env.AWS_CI_TURBOREPO_S3_BUCKET }} + team-id: ${{ inputs.team-id }} - name: Prepare environment for building a NodeJS application - uses: milaboratory/github-ci/actions/node/prepare-pnpm@v4 + uses: milaboratory/github-ci/actions/node/prepare-pnpm@v4-beta env: PNPM_VERSION: ${{ needs.metadata.outputs.pnpm-version }} with: @@ -458,7 +462,7 @@ jobs: npmrc-config: ${{ inputs.npmrc-config }} - name: Install NodeJS packages with pnpm - uses: milaboratory/github-ci/actions/shell@v4 + uses: milaboratory/github-ci/actions/shell@v4-beta env: NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPMJS_TOKEN: ${{ env.NPMJS_TOKEN }} @@ -502,7 +506,7 @@ jobs: fi - name: Run build - uses: milaboratory/github-ci/blocks/node/build-and-test-pnpm@v4 + uses: milaboratory/github-ci/blocks/node/build-and-test-pnpm@v4-beta env: NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPMJS_TOKEN: ${{ env.NPMJS_TOKEN }} @@ -523,7 +527,7 @@ jobs: - name: Run tests id: test - uses: milaboratory/github-ci/blocks/pl/linux/test-pl-docker-pnpm@v4 + uses: milaboratory/github-ci/blocks/pl/linux/test-pl-docker-pnpm@v4-beta if: inputs.test env: PL_ADDRESS: "http://127.0.0.1:6345" @@ -558,7 +562,7 @@ jobs: run: echo "user-id=$(gh api "/users/${{ steps.app-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT" - name: Commit changed files to main - uses: milaboratory/github-ci/actions/shell@v4 + uses: milaboratory/github-ci/actions/shell@v4-beta if: steps.check-changes.outputs.has-changes == '1' env: USER_ID: ${{ steps.get-user-id.outputs.user-id }} @@ -615,12 +619,12 @@ jobs: steps: - id: search-tags if: always() - uses: milaboratory/github-ci/actions/strings/json-list@v4 + uses: milaboratory/github-ci/actions/strings/json-list@v4-beta with: input: | release - - uses: milaboratory/github-ci/blocks/notify/release@v4 + - uses: milaboratory/github-ci/blocks/notify/release@v4-beta env: NPM_PKG_VERSION: ${{ needs.metadata.outputs.npm-pkg-version }} with: diff --git a/actions/node/prepare/action.yaml b/actions/node/prepare/action.yaml index f74864cd..de2823e3 100644 --- a/actions/node/prepare/action.yaml +++ b/actions/node/prepare/action.yaml @@ -115,4 +115,4 @@ runs: shell: bash working-directory: ${{ inputs.working-directory }} run: | - npm ci \ No newline at end of file + npm ci diff --git a/blocks/node/build/generic/action.yaml b/blocks/node/build/generic/action.yaml index be99f006..236a6e83 100644 --- a/blocks/node/build/generic/action.yaml +++ b/blocks/node/build/generic/action.yaml @@ -123,4 +123,4 @@ runs: shell: bash working-directory: ${{ inputs.working-directory }} run: | - npm run ${{ inputs.build-script-name }} \ No newline at end of file + npm run ${{ inputs.build-script-name }} diff --git a/blocks/node/test/action.yaml b/blocks/node/test/action.yaml index 4eb59a22..ed7b10c5 100644 --- a/blocks/node/test/action.yaml +++ b/blocks/node/test/action.yaml @@ -135,6 +135,7 @@ runs: - name: Run build - ${{ inputs.build-script-name }} - (macOS and Linux) if: inputs.build-before-run-test != 'false' && runner.os != 'Windows' + shell: bash working-directory: ${{ inputs.working-directory }} run: | @@ -143,6 +144,7 @@ runs: - name: Run build - ${{ inputs.build-script-name }} - (Windows) if: inputs.build-before-run-test != 'false' && runner.os == 'Windows' + shell: pwsh working-directory: ${{ inputs.working-directory }} run: | @@ -152,6 +154,7 @@ runs: if: runner.os != 'Windows' env: NODE_AUTH_TOKEN: ${{ inputs.npm-auth-token }} + shell: bash working-directory: ${{ inputs.working-directory }} run: | @@ -161,6 +164,7 @@ runs: if: runner.os == 'Windows' env: NODE_AUTH_TOKEN: ${{ inputs.npm-auth-token }} + shell: pwsh working-directory: ${{ inputs.working-directory }} run: | diff --git a/blocks/update-cdn-link/action.yaml b/blocks/update-cdn-link/action.yaml index abc922c1..eb4a078d 100644 --- a/blocks/update-cdn-link/action.yaml +++ b/blocks/update-cdn-link/action.yaml @@ -75,4 +75,4 @@ runs: aws s3api put-object \ --bucket "${S3_BUCKET}" \ --key "${S3_KEY}" \ - --website-redirect-location "${REDIRECT_LINK}" \ No newline at end of file + --website-redirect-location "${REDIRECT_LINK}"