-
Notifications
You must be signed in to change notification settings - Fork 1
DEVEX-1630: shared PHP build orchestrators (foundation) #129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
pdodgen-revparts
wants to merge
11
commits into
main
Choose a base branch
from
DEVEX-1630-unify-php-build-workflows
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
c89a8e0
docs: add DEVEX-1630 design spec for unifying PHP build workflows
pdodgen-revparts a70a76d
docs: expand DEVEX-1630 spec scope (radmin, vin_decoder_service, webs…
pdodgen-revparts 809cac5
docs: add DEVEX-1630 implementation plan for PHP build unification
pdodgen-revparts b03b699
feat: add image_name/extra_tag/cache_type inputs to php-build-push, m…
pdodgen-revparts 0122458
fix: key php-build-push buildx cache per resolved image name
pdodgen-revparts 5646968
feat: add build-php-v1 reusable orchestrator
pdodgen-revparts fda97d3
feat: add build-php-laravel reusable orchestrator
pdodgen-revparts 0f26fb9
docs: reconcile plan with local-path nested reusable workflow calls
pdodgen-revparts 835a9f7
feat: make Laravel webserver image tag prefix configurable (default w…
pdodgen-revparts 6c6ac70
docs: parametrize Laravel webserver prefix; returns-api/vin keep nginx-
pdodgen-revparts 42a605b
fix: org-scope bare image names and per-build cache keys in php-build…
pdodgen-revparts File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,107 @@ | ||
| name: Build PHP (Laravel) | ||
| on: | ||
| workflow_call: | ||
| inputs: | ||
| php_version: | ||
| required: false | ||
| type: string | ||
| default: "8.3" | ||
| php_extensions: | ||
| required: false | ||
| type: string | ||
| default: "bcmath intl gd" | ||
| build_cli_image: | ||
| required: false | ||
| type: boolean | ||
| default: false | ||
| dockerfile_app_path: | ||
| required: false | ||
| type: string | ||
| default: "./build/Dockerfile-app" | ||
| dockerfile_webserver_path: | ||
| required: false | ||
| type: string | ||
| default: "./build/Dockerfile-nginx" | ||
| webserver_tag_prefix: | ||
| required: false | ||
| type: string | ||
| default: "webserver-" | ||
| dockerfile_cli_path: | ||
| required: false | ||
| type: string | ||
| default: "./build/Dockerfile-cli" | ||
| release_branches: | ||
| required: false | ||
| type: string | ||
| default: "stage,hotfix,rc" | ||
| secrets: | ||
| packagist_username: | ||
| required: true | ||
| packagist_password: | ||
| required: true | ||
| gh_token: | ||
| required: true | ||
| outputs: | ||
| tag: | ||
| description: "The released tag" | ||
| value: ${{ jobs.tag-and-release.outputs.tag }} | ||
|
|
||
| jobs: | ||
| calculate-tag: | ||
| name: Calculate Build Tag | ||
| runs-on: ubuntu-latest | ||
| outputs: | ||
| tag: ${{ steps.dry_tag_version.outputs.new_tag }} | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| with: | ||
| fetch-depth: 0 | ||
| - id: dry_tag_version | ||
| uses: mathieudutour/github-tag-action@v6.1 | ||
| with: | ||
| github_token: ${{ secrets.gh_token }} | ||
| release_branches: ${{ inputs.release_branches }} | ||
| fetch_all_tags: true | ||
| dry_run: true | ||
|
|
||
| build: | ||
| needs: [calculate-tag] | ||
| uses: ./.github/workflows/php-laravel-build-push.yaml | ||
| with: | ||
| php_version: ${{ inputs.php_version }} | ||
| php_extensions: ${{ inputs.php_extensions }} | ||
| build_app_image: true | ||
| build_webserver_image: true | ||
| build_cli_image: ${{ inputs.build_cli_image }} | ||
| dockerfile_app_path: ${{ inputs.dockerfile_app_path }} | ||
| dockerfile_webserver_path: ${{ inputs.dockerfile_webserver_path }} | ||
| webserver_tag_prefix: ${{ inputs.webserver_tag_prefix }} | ||
| dockerfile_cli_path: ${{ inputs.dockerfile_cli_path }} | ||
| new_tag: ${{ needs.calculate-tag.outputs.tag }} | ||
| secrets: | ||
| packagist_username: ${{ secrets.packagist_username }} | ||
| packagist_password: ${{ secrets.packagist_password }} | ||
| gh_token: ${{ secrets.gh_token }} | ||
|
|
||
| tag-and-release: | ||
| name: Github Tag and Release | ||
| needs: [build] | ||
| runs-on: ubuntu-latest | ||
| outputs: | ||
| tag: ${{ steps.tag_version.outputs.new_tag }} | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| with: | ||
| fetch-depth: 0 | ||
| - id: tag_version | ||
| uses: mathieudutour/github-tag-action@v6.1 | ||
| with: | ||
| github_token: ${{ secrets.gh_token }} | ||
| release_branches: ${{ inputs.release_branches }} | ||
| fetch_all_tags: true | ||
| - uses: ncipollo/release-action@v1 | ||
| with: | ||
| tag: ${{ steps.tag_version.outputs.new_tag }} | ||
| name: Prerelease ${{ steps.tag_version.outputs.new_tag }} | ||
| body: ${{ steps.tag_version.outputs.changelog }} | ||
| prerelease: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,92 @@ | ||
| name: Build PHP (v1) | ||
| on: | ||
| workflow_call: | ||
| inputs: | ||
| images: | ||
| description: 'JSON array of {image_name?, dockerfile, target?, tag_prefix, extra_tag}' | ||
| required: true | ||
| type: string | ||
| php_version: | ||
| required: false | ||
| type: string | ||
| default: "8.3" | ||
| release_branches: | ||
| required: false | ||
| type: string | ||
| default: "stage,hotfix,rc" | ||
| cache_type: | ||
| required: false | ||
| type: string | ||
| default: "gha" | ||
| secrets: | ||
| packagist_username: | ||
| required: true | ||
| packagist_password: | ||
| required: true | ||
| gh_token: | ||
| required: true | ||
| outputs: | ||
| tag: | ||
| description: "The released tag" | ||
| value: ${{ jobs.tag-and-release.outputs.tag }} | ||
|
|
||
| jobs: | ||
| calculate-tag: | ||
| name: Calculate Build Tag | ||
| runs-on: ubuntu-latest | ||
| outputs: | ||
| tag: ${{ steps.dry_tag_version.outputs.new_tag }} | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| with: | ||
| fetch-depth: 0 | ||
| - id: dry_tag_version | ||
| uses: mathieudutour/github-tag-action@v6.1 | ||
| with: | ||
| github_token: ${{ secrets.gh_token }} | ||
| release_branches: ${{ inputs.release_branches }} | ||
| fetch_all_tags: true | ||
| dry_run: true | ||
|
|
||
| build: | ||
| name: Build ${{ matrix.image.tag_prefix }}image | ||
| needs: [calculate-tag] | ||
| strategy: | ||
| matrix: | ||
| image: ${{ fromJSON(inputs.images) }} | ||
| uses: ./.github/workflows/php-build-push.yaml | ||
| with: | ||
| php_version: ${{ inputs.php_version }} | ||
| image_name: ${{ matrix.image.image_name }} | ||
| dockerfile: ${{ matrix.image.dockerfile }} | ||
| build_target: ${{ matrix.image.target }} | ||
| tag: ${{ matrix.image.tag_prefix }}${{ needs.calculate-tag.outputs.tag }} | ||
| extra_tag: ${{ matrix.image.extra_tag }} | ||
| cache_type: ${{ inputs.cache_type }} | ||
| secrets: | ||
| packagist_username: ${{ secrets.packagist_username }} | ||
| packagist_password: ${{ secrets.packagist_password }} | ||
| gh_token: ${{ secrets.gh_token }} | ||
|
|
||
| tag-and-release: | ||
| name: Github Tag and Release | ||
| needs: [build] | ||
| runs-on: ubuntu-latest | ||
| outputs: | ||
| tag: ${{ steps.tag_version.outputs.new_tag }} | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| with: | ||
| fetch-depth: 0 | ||
| - id: tag_version | ||
| uses: mathieudutour/github-tag-action@v6.1 | ||
| with: | ||
| github_token: ${{ secrets.gh_token }} | ||
| release_branches: ${{ inputs.release_branches }} | ||
| fetch_all_tags: true | ||
| - uses: ncipollo/release-action@v1 | ||
| with: | ||
| tag: ${{ steps.tag_version.outputs.new_tag }} | ||
| name: Prerelease ${{ steps.tag_version.outputs.new_tag }} | ||
| body: ${{ steps.tag_version.outputs.changelog }} | ||
| prerelease: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.