diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b96aaa13e..8e98f1b41 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,5 +1,9 @@ name: CI +env: + stacks_list_for_shell_expansion: "{heroku-20,heroku-22,heroku-24-amd64,heroku-24-arm64}" + src_path_suffix: "-develop/" + on: push: branches: @@ -58,11 +62,11 @@ jobs: echo "$HOME/usr/bin" >> "$GITHUB_PATH" - name: Hatchet setup run: bundle exec hatchet ci:setup - - name: Export HEROKU_PHP_PLATFORM_REPOSITORIES to …-develop (since we are not building main or a tag) + - name: Export HEROKU_PHP_PLATFORM_REPOSITORIES to …${{env.src_path_suffix}} (since we are not building main or a tag) if: github.ref_type != 'tag' && github.ref_name != 'main' run: | if [[ $STACK != heroku-2[02] ]]; then STACK="${STACK}-amd64"; fi - echo "HEROKU_PHP_PLATFORM_REPOSITORIES=- https://lang-php.s3.us-east-1.amazonaws.com/dist-${STACK}-develop/" >> "$GITHUB_ENV" + echo "HEROKU_PHP_PLATFORM_REPOSITORIES=- https://lang-php.s3.us-east-1.amazonaws.com/dist-${STACK}${{env.src_path_suffix}}" >> "$GITHUB_ENV" - name: Calculate number of parallel_rspec processes (half of num of lines in runtime log) run: echo "PARALLEL_TEST_PROCESSORS=$(( ($(cat test/var/log/parallel_runtime_rspec.${STACK}.log | wc -l)+2-1)/2 ))" >> "$GITHUB_ENV" - name: Execute tests diff --git a/.github/workflows/platform-build.yml b/.github/workflows/platform-build.yml index 373ab9924..29b9ff1d0 100644 --- a/.github/workflows/platform-build.yml +++ b/.github/workflows/platform-build.yml @@ -1,6 +1,9 @@ name: Platform packages build and deploy to -develop/ run-name: Build ${{ inputs.dry-run == true && 'w/o deploy' || '& deploy' }}${{ inputs.overwrite == true && '(+overwrite)' || '' }} to dist-${{inputs.stack}}-develop/ ${{ inputs.publish == false && 'w/o publishing packages into Composer platform repository' || '' }} +env: + dst_path_suffix: "-stable/" + on: workflow_dispatch: inputs: @@ -136,7 +139,7 @@ jobs: - name: Dry-run sync.sh to show package changes available for syncing to production bucket run: | set -o pipefail - (yes n 2>/dev/null || true) | docker run --rm -i --env-file=support/build/_docker/env.default heroku-php-build-${{inputs.stack}}:${{github.sha}} sync.sh lang-php dist-${{inputs.stack}}-stable/ 2>&1 | tee sync.out + (yes n 2>/dev/null || true) | docker run --rm -i --env-file=support/build/_docker/env.default heroku-php-build-${{inputs.stack}}:${{github.sha}} sync.sh lang-php dist-${{inputs.stack}}${{env.dst_path_suffix}} 2>&1 | tee sync.out - name: Output job summary run: | echo '## Package changes available for syncing to production bucket' >> "$GITHUB_STEP_SUMMARY"