mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
devel
This commit is contained in:
@@ -12,7 +12,7 @@ on:
|
|||||||
description: 'skip pr approve check'
|
description: 'skip pr approve check'
|
||||||
required: false
|
required: false
|
||||||
type: boolean
|
type: boolean
|
||||||
default: false
|
default: false
|
||||||
pull_request:
|
pull_request:
|
||||||
types: [opened, synchronize, reopened]
|
types: [opened, synchronize, reopened]
|
||||||
branches:
|
branches:
|
||||||
@@ -70,38 +70,38 @@ env:
|
|||||||
DOCKER_REPOSITORY: "${{ secrets.DOCKER_REPOSITORY_DOMAIN }}/alfresco/demo-shell"
|
DOCKER_REPOSITORY: "${{ secrets.DOCKER_REPOSITORY_DOMAIN }}/alfresco/demo-shell"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check-if-pr-is-approved:
|
check-if-pr-is-approved:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Check if PR is approved
|
- name: Check if PR is approved
|
||||||
id: action
|
id: action
|
||||||
if: ${{ github.event_name != 'schedule' }}
|
if: ${{ github.event_name != 'schedule' }}
|
||||||
uses: kamatama41/get-pr-number-action@v0
|
uses: kamatama41/get-pr-number-action@v0
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Show the number
|
- name: Show the number
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ github.token }}
|
GH_TOKEN: ${{ github.token }}
|
||||||
DEVEL_FLAG: ${{ inputs.skip-pr-approve }} #put it to true if you need to develop the pipeline on your own branch. before the final merge put it to false
|
DEVEL_FLAG: ${{ inputs.skip-pr-approve }} #put it to true if you need to develop the pipeline on your own branch. before the final merge put it to false
|
||||||
shell: bash
|
shell: bash
|
||||||
if: ${{ github.event_name != 'schedule' }}
|
if: ${{ github.event_name != 'schedule' }}
|
||||||
run: |
|
run: |
|
||||||
if [[ "$DEVEL_FLAG" = false ]] ; then
|
if [[ "$DEVEL_FLAG" = false ]] ; then
|
||||||
echo "PR number is: ${{ steps.action.outputs.number }}"
|
echo "PR number is: ${{ steps.action.outputs.number }}"
|
||||||
prNumber=${{ steps.action.outputs.number }}
|
prNumber=${{ steps.action.outputs.number }}
|
||||||
checkApproval=$(gh api /repos/Alfresco/alfresco-ng2-components/pulls/$prNumber/reviews | jq '.[] | select(.state == "APPROVED") | .user.login')
|
checkApproval=$(gh api /repos/Alfresco/alfresco-ng2-components/pulls/$prNumber/reviews | jq '.[] | select(.state == "APPROVED") | .user.login')
|
||||||
if [[ $checkApproval ]]; then
|
if [[ $checkApproval ]]; then
|
||||||
echo "PR approved"
|
echo "PR approved"
|
||||||
else
|
else
|
||||||
echo "PR not approved yet"
|
echo "PR not approved yet"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "you are on your branch: skipping the check. REMEMBER to put DEVEL_FLAG to FALSE before the final merge!"
|
echo "you are on your branch: skipping the check. REMEMBER to put DEVEL_FLAG to FALSE before the final merge!"
|
||||||
fi
|
fi
|
||||||
@@ -119,15 +119,15 @@ jobs:
|
|||||||
fetch-depth: 0 # Fetch all history for all tags and branches
|
fetch-depth: 0 # Fetch all history for all tags and branches
|
||||||
- uses: ./.github/actions/setup
|
- uses: ./.github/actions/setup
|
||||||
id: setup
|
id: setup
|
||||||
with:
|
with:
|
||||||
use-gh-nx-cache: false
|
use-gh-nx-cache: false
|
||||||
use-gh-node-modules-cache: false
|
use-gh-node-modules-cache: false
|
||||||
- name: run ci
|
- name: run ci
|
||||||
if: steps.setup.outputs.cache-hit != 'true'
|
if: steps.setup.outputs.cache-hit != 'true'
|
||||||
run: npm ci
|
run: npm ci
|
||||||
- run: nx run cli:bundle
|
- run: nx run cli:bundle
|
||||||
- run: nx run testing:bundle
|
- run: nx run testing:bundle
|
||||||
- uses: ./.github/actions/upload-cache-and-artifacts
|
- uses: ./.github/actions/upload-job-artifacts
|
||||||
with:
|
with:
|
||||||
packages: 'dist node_modules'
|
packages: 'dist node_modules'
|
||||||
|
|
||||||
@@ -155,11 +155,11 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0 # Fetch all history for all tags and branches
|
fetch-depth: 0 # Fetch all history for all tags and branches
|
||||||
- uses: ./.github/actions/setup
|
- uses: ./.github/actions/setup
|
||||||
with:
|
with:
|
||||||
use-gh-nx-cache: false
|
use-gh-nx-cache: false
|
||||||
use-gh-node-modules-cache: false
|
use-gh-node-modules-cache: false
|
||||||
cache-key-suffix: unit-tests-${{ matrix.unit-tests.name }}
|
cache-key-suffix: unit-tests-${{ matrix.unit-tests.name }}
|
||||||
- uses: ./.github/actions/download-cache-and-artifacts
|
- uses: ./.github/actions/download-job-artifacts
|
||||||
with:
|
with:
|
||||||
packages: 'node_modules'
|
packages: 'node_modules'
|
||||||
persistent-packages: 'nxcache'
|
persistent-packages: 'nxcache'
|
||||||
@@ -167,11 +167,11 @@ jobs:
|
|||||||
- name: Run unit tests
|
- name: Run unit tests
|
||||||
run: |
|
run: |
|
||||||
/usr/bin/xvfb-run --auto-servernum nx affected:test $NX_CALCULATION_FLAGS --exclude=${{ matrix.unit-tests.exclude }}
|
/usr/bin/xvfb-run --auto-servernum nx affected:test $NX_CALCULATION_FLAGS --exclude=${{ matrix.unit-tests.exclude }}
|
||||||
- uses: ./.github/actions/upload-cache-and-artifacts
|
- uses: ./.github/actions/upload-job-artifacts
|
||||||
with:
|
with:
|
||||||
persistent-packages: 'nxcache'
|
persistent-packages: 'nxcache'
|
||||||
packages-key-suffix: ${{ matrix.unit-tests.name }}
|
packages-key-suffix: ${{ matrix.unit-tests.name }}
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
# long timeout required when cache has to be recreated
|
# long timeout required when cache has to be recreated
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
@@ -184,16 +184,16 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0 # Fetch all history for all tags and branches
|
fetch-depth: 0 # Fetch all history for all tags and branches
|
||||||
- uses: ./.github/actions/setup
|
- uses: ./.github/actions/setup
|
||||||
with:
|
with:
|
||||||
use-gh-nx-cache: false
|
use-gh-nx-cache: false
|
||||||
use-gh-node-modules-cache: false
|
use-gh-node-modules-cache: false
|
||||||
cache-key-suffix: ${{ github.ref_name }}-lint
|
cache-key-suffix: ${{ github.ref_name }}-lint
|
||||||
- uses: ./.github/actions/download-cache-and-artifacts
|
- uses: ./.github/actions/download-job-artifacts
|
||||||
with:
|
with:
|
||||||
packages: 'node_modules'
|
packages: 'node_modules'
|
||||||
persistent-packages: 'nxcache'
|
persistent-packages: 'nxcache'
|
||||||
- run: nx affected --target=lint $NX_CALCULATION_FLAGS
|
- run: nx affected --target=lint $NX_CALCULATION_FLAGS
|
||||||
- uses: ./.github/actions/upload-cache-and-artifacts
|
- uses: ./.github/actions/upload-job-artifacts
|
||||||
with:
|
with:
|
||||||
persistent-packages: 'nxcache'
|
persistent-packages: 'nxcache'
|
||||||
packages-key-suffix: ${{ github.ref_name }}-lint
|
packages-key-suffix: ${{ github.ref_name }}-lint
|
||||||
@@ -210,11 +210,11 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0 # Fetch all history for all tags and branches
|
fetch-depth: 0 # Fetch all history for all tags and branches
|
||||||
- uses: ./.github/actions/setup
|
- uses: ./.github/actions/setup
|
||||||
with:
|
with:
|
||||||
use-gh-nx-cache: false
|
use-gh-nx-cache: false
|
||||||
use-gh-node-modules-cache: false
|
use-gh-node-modules-cache: false
|
||||||
cache-key-suffix: build-libs
|
cache-key-suffix: build-libs
|
||||||
- uses: ./.github/actions/download-cache-and-artifacts
|
- uses: ./.github/actions/download-job-artifacts
|
||||||
with:
|
with:
|
||||||
packages: 'node_modules'
|
packages: 'node_modules'
|
||||||
persistent-packages: 'nxcache'
|
persistent-packages: 'nxcache'
|
||||||
@@ -223,7 +223,7 @@ jobs:
|
|||||||
- run: nx affected:build $NX_CALCULATION_FLAGS --prod
|
- run: nx affected:build $NX_CALCULATION_FLAGS --prod
|
||||||
- run: nx build demoshell --configuration production
|
- run: nx build demoshell --configuration production
|
||||||
- run: nx affected --target=build-storybook $NX_CALCULATION_FLAGS --configuration ci
|
- run: nx affected --target=build-storybook $NX_CALCULATION_FLAGS --configuration ci
|
||||||
- uses: ./.github/actions/upload-cache-and-artifacts
|
- uses: ./.github/actions/upload-job-artifacts
|
||||||
with:
|
with:
|
||||||
packages: 'dist node_modules'
|
packages: 'dist node_modules'
|
||||||
persistent-packages: 'nxcache'
|
persistent-packages: 'nxcache'
|
||||||
@@ -240,10 +240,10 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0 # Fetch all history for all
|
fetch-depth: 0 # Fetch all history for all
|
||||||
- uses: ./.github/actions/setup
|
- uses: ./.github/actions/setup
|
||||||
with:
|
with:
|
||||||
use-gh-nx-cache: false
|
use-gh-nx-cache: false
|
||||||
use-gh-node-modules-cache: false
|
use-gh-node-modules-cache: false
|
||||||
- uses: ./.github/actions/download-cache-and-artifacts
|
- uses: ./.github/actions/download-job-artifacts
|
||||||
with:
|
with:
|
||||||
packages: 'dist node_modules'
|
packages: 'dist node_modules'
|
||||||
- name: Process Cloud Storybook Playwright
|
- name: Process Cloud Storybook Playwright
|
||||||
@@ -383,7 +383,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
use-gh-nx-cache: false
|
use-gh-nx-cache: false
|
||||||
use-gh-node-modules-cache: false
|
use-gh-node-modules-cache: false
|
||||||
- uses: ./.github/actions/download-cache-and-artifacts
|
- uses: ./.github/actions/download-job-artifacts
|
||||||
with:
|
with:
|
||||||
packages: 'dist node_modules'
|
packages: 'dist node_modules'
|
||||||
- name: setup chrome
|
- name: setup chrome
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- uses: ./.github/actions/setup
|
- uses: ./.github/actions/setup
|
||||||
with:
|
with:
|
||||||
use-gh-nx-cache: false
|
use-gh-nx-cache: false
|
||||||
use-gh-node-modules-cache: false
|
use-gh-node-modules-cache: false
|
||||||
- name: install
|
- name: install
|
||||||
@@ -87,7 +87,7 @@ jobs:
|
|||||||
npm ci
|
npm ci
|
||||||
nx run cli:bundle
|
nx run cli:bundle
|
||||||
nx run testing:bundle
|
nx run testing:bundle
|
||||||
- uses: ./.github/actions/upload-cache-and-artifacts
|
- uses: ./.github/actions/upload-job-artifacts
|
||||||
with:
|
with:
|
||||||
packages: 'dist nxcache node_modules'
|
packages: 'dist nxcache node_modules'
|
||||||
|
|
||||||
@@ -104,13 +104,13 @@ jobs:
|
|||||||
- run: git fetch --all
|
- run: git fetch --all
|
||||||
- id: set-dryrun
|
- id: set-dryrun
|
||||||
uses: ./.github/actions/enable-dryrun
|
uses: ./.github/actions/enable-dryrun
|
||||||
with:
|
with:
|
||||||
dry-run-flag: ${{ inputs.dry-run-release }}
|
dry-run-flag: ${{ inputs.dry-run-release }}
|
||||||
- uses: ./.github/actions/setup
|
- uses: ./.github/actions/setup
|
||||||
with:
|
with:
|
||||||
use-gh-nx-cache: false
|
use-gh-nx-cache: false
|
||||||
use-gh-node-modules-cache: false
|
use-gh-node-modules-cache: false
|
||||||
- uses: ./.github/actions/download-cache-and-artifacts
|
- uses: ./.github/actions/download-job-artifacts
|
||||||
with:
|
with:
|
||||||
packages: 'dist nxcache node_modules'
|
packages: 'dist nxcache node_modules'
|
||||||
- name: release Demoshell docker
|
- name: release Demoshell docker
|
||||||
@@ -132,20 +132,20 @@ jobs:
|
|||||||
- run: git fetch --all
|
- run: git fetch --all
|
||||||
- id: set-dryrun
|
- id: set-dryrun
|
||||||
uses: ./.github/actions/enable-dryrun
|
uses: ./.github/actions/enable-dryrun
|
||||||
with:
|
with:
|
||||||
dry-run-flag: ${{ inputs.dry-run-release }}
|
dry-run-flag: ${{ inputs.dry-run-release }}
|
||||||
- uses: ./.github/actions/setup
|
- uses: ./.github/actions/setup
|
||||||
with:
|
with:
|
||||||
use-gh-nx-cache: false
|
use-gh-nx-cache: false
|
||||||
use-gh-node-modules-cache: false
|
use-gh-node-modules-cache: false
|
||||||
act: ${{ inputs.dry-run-release }}
|
act: ${{ inputs.dry-run-release }}
|
||||||
- uses: ./.github/actions/download-cache-and-artifacts
|
- uses: ./.github/actions/download-job-artifacts
|
||||||
with:
|
with:
|
||||||
packages: 'dist nxcache node_modules'
|
packages: 'dist nxcache node_modules'
|
||||||
- name: release Storybook docker
|
- name: release Storybook docker
|
||||||
run: |
|
run: |
|
||||||
nx run stories:build-storybook --configuration ci
|
nx run stories:build-storybook --configuration ci
|
||||||
. ./scripts/travis/release/docker-tag.sh
|
. ./scripts/travis/release/docker-tag.sh
|
||||||
./scripts/travis/release/release-storybook-docker.sh ${{ steps.set-dryrun.outputs.dryrun }}
|
./scripts/travis/release/release-storybook-docker.sh ${{ steps.set-dryrun.outputs.dryrun }}
|
||||||
|
|
||||||
release-npm:
|
release-npm:
|
||||||
@@ -159,14 +159,14 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- uses: ./.github/actions/setup
|
- uses: ./.github/actions/setup
|
||||||
with:
|
with:
|
||||||
use-gh-nx-cache: false
|
use-gh-nx-cache: false
|
||||||
use-gh-node-modules-cache: false
|
use-gh-node-modules-cache: false
|
||||||
- id: set-dryrun
|
- id: set-dryrun
|
||||||
uses: ./.github/actions/enable-dryrun
|
uses: ./.github/actions/enable-dryrun
|
||||||
with:
|
with:
|
||||||
dry-run-flag: ${{ inputs.dry-run-release }}
|
dry-run-flag: ${{ inputs.dry-run-release }}
|
||||||
- uses: ./.github/actions/download-cache-and-artifacts
|
- uses: ./.github/actions/download-job-artifacts
|
||||||
with:
|
with:
|
||||||
packages: 'dist nxcache node_modules'
|
packages: 'dist nxcache node_modules'
|
||||||
- name: build libraries
|
- name: build libraries
|
||||||
|
|||||||
Reference in New Issue
Block a user