diff --git a/.github/workflows/adf_alpha.yml b/.github/workflows/adf_alpha.yml index 8fb76f3251..5a366b7de1 100644 --- a/.github/workflows/adf_alpha.yml +++ b/.github/workflows/adf_alpha.yml @@ -1,4 +1,4 @@ -name: "alpha-adf" +name: "upstream adf" on: workflow_call: @@ -20,7 +20,7 @@ env: TRAVIS_COMMIT: ${{ github.sha }} BUILD_ID: ${{ github.run_id }} TRAVIS_RUN_NUMBER: ${{ github.run_attempt }} - TRAVIS_BUILD_NUMBER: github-run-${{ github.run_id }} + TRAVIS_BUILD_NUMBER: ${{ github.run_id }} JOB_ID: ${{ github.run_id }} PROXY_HOST_BPM: ${{ secrets.E2E_HOST }} E2E_HOST_APA: ${{ secrets.E2E_HOST_APA }} @@ -58,7 +58,7 @@ env: jobs: trigger_adf: - name: trigger adf test + name: trigger adf runs-on: ubuntu-latest steps: - name: Checkout repository @@ -73,7 +73,8 @@ jobs: - name: Trigger Alpha ADF child build shell: bash if: ${{ contains(github.event.head_commit.message, '[trigger adf]') || inputs.cluster_operation == 'TRIGGER_ALPHA_ADF' || github.event.schedule == '0 12 * * *' }} - run: | + run: | + pull_number=$(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH") npm install github-api ./scripts/travis/update/update-project.sh -p $TRAVIS_BUILD_NUMBER -t $GH_TOKEN -v alpha -c $TRAVIS_COMMIT \ No newline at end of file diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 2b9e37f926..3f2c146a48 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -7,7 +7,10 @@ on: description: 'enable dry-run on artifact push' required: false type: boolean - default: true + default: true + push: + branches: + - AAE-12046-pr-condition pull_request: types: [opened, synchronize, reopened] branches: @@ -66,7 +69,8 @@ env: jobs: setup: - # long timeout required when cache has to be recreated + + # long timeout required when cache has to be recreated timeout-minutes: 30 name: "Setup" runs-on: ubuntu-22.04 diff --git a/scripts/travis/update/update-project.sh b/scripts/travis/update/update-project.sh index c2c2197be6..d9b8604711 100755 --- a/scripts/travis/update/update-project.sh +++ b/scripts/travis/update/update-project.sh @@ -75,6 +75,7 @@ update_js_dependency() { update() { NAME_REPO=$1 + PKG_VERSION=$(npm view $PKG@$VERSION version) echo "Update dependencies $NAME_REPO" git clone https://$TOKEN@github.com/Alfresco/$NAME_REPO.git $TEMP_GENERATOR_DIR @@ -106,7 +107,7 @@ update() { git push --force origin $BRANCH_TO_CREATE fi - node $BUILD_PIPELINE_DIR/pr-creator.js --token=$TOKEN --title="Update branch for ADF ${PR_NUMBER} and JS-API ${JS_API_INSTALLED} [ci:force]" --head=$BRANCH_TO_CREATE --repo=$NAME_REPO --commit=$COMMIT + node $BUILD_PIPELINE_DIR/pr-creator.js --token=$TOKEN --title="Update branch for ADF ${PKG_VERSION} and JS-API ${JS_API_INSTALLED} [ci:force]" --head=$BRANCH_TO_CREATE --repo=$NAME_REPO --commit=$COMMIT cd .. rm -rf $TEMP_GENERATOR_DIR