Skip to content

Commit

Permalink
make -develop/ and -stable/ vars in other workflow files, too
Browse files Browse the repository at this point in the history
easier to temporarily test other 'buckets' that way
  • Loading branch information
dzuelke committed Jun 8, 2024
1 parent 89a72c3 commit 7553200
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/platform-build.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 7553200

Please sign in to comment.