-
Notifications
You must be signed in to change notification settings - Fork 86
IBX-9904: Workflow to build API refs into new PR #2723
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
Merged
Merged
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
efc2c1a
Draft workflow to open API refs PR
adriendupuis a41b6da
api_refs.yaml: checkout the right branch before forking a new one.
adriendupuis 530cb71
api_refs.yaml: dummy triggers to register workflow
adriendupuis 351dd86
Revert "api_refs.yaml: dummy triggers to register workflow"
adriendupuis d35164c
api_refs.yaml: Fix base_branch parsing
adriendupuis 8608526
api_refs.yaml: Fix new branch creation
adriendupuis 3583718
api_refs.yaml: Set a Git user
adriendupuis 2877a5f
api_refs.yaml: Fix branch push
adriendupuis 212c761
api_refs.yaml: Fix branch push
adriendupuis 07dbfe0
api_refs.yaml: Fix branch push and PR create
adriendupuis 966229f
api_refs.yaml: Fix branch push and PR create
adriendupuis 339e28b
api_refs.yaml: Composer authentication
adriendupuis a5ebbf9
api_refs.yaml: Composer authentication
adriendupuis a05d429
api_refs.yaml: Enh. PHP performance
adriendupuis 042e1b5
api_refs.yaml: Prepare PR state and labels
adriendupuis 2338db6
api_refs.yaml: Try to debug the \E issue
adriendupuis 4ad53d2
api_refs.yaml: Try to debug the \E issue
adriendupuis de4a959
api_refs.yaml: Try to debug the \E issue
adriendupuis 0f262ab
api_refs.yaml: Try to debug the \E issue
adriendupuis 312b68c
api_refs.yaml: Try to fix the \E issue
adriendupuis 16fd5be
api_refs.yaml: Try to fix the \E issue
adriendupuis dd4d8b9
Revert "api_refs.yaml: Try to fix the \E issue"
adriendupuis d4611c3
api_refs.yaml: Try to fix the \E issue
adriendupuis 6595e79
api_refs.yaml: Clean-up after debug
adriendupuis bfb1f44
api_refs.yaml: Try to trigger PR workflows
adriendupuis 7dc8794
api_refs.yaml: Try to trigger PR workflows
adriendupuis 946d0e3
api_refs.yaml: Try to trigger PR workflows
adriendupuis dabdfa9
api_refs.yaml: Set prod conf back
adriendupuis 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,66 @@ | ||
name: 'Build API Refs' | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: 'Released version' | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
open_php_api_ref_pr: | ||
name: "PHP & REST API References' PR" | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Set version and branches | ||
id: version_and_branches | ||
run: | | ||
version="${{ inputs.version }}" | ||
base_branch="$(echo $version | sed 's/v\(.*\..*\)\..*/\1/')" | ||
work_branch="api_refs_$version" | ||
echo "version=$version" >> "$GITHUB_OUTPUT" | ||
echo "base_branch=$base_branch" >> "$GITHUB_OUTPUT" | ||
echo "work_branch=$work_branch" >> "$GITHUB_OUTPUT" | ||
|
||
- name: Checkout documentation | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ steps.version_and_branches.outputs.base_branch }} | ||
|
||
- name: Disable PHP coverage | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
coverage: none | ||
|
||
- name: Build API Refs | ||
env: | ||
SATIS_NETWORK_KEY: ${{ secrets.SATIS_NETWORK_KEY }} | ||
SATIS_NETWORK_TOKEN: ${{ secrets.SATIS_NETWORK_TOKEN }} | ||
run: | | ||
composer config --global http-basic.updates.ibexa.co $SATIS_NETWORK_KEY $SATIS_NETWORK_TOKEN | ||
#TODO: On 5.0, update tool to handle both PHP & REST APIs | ||
tools/php_api_ref/phpdoc.sh | ||
# Fix escape character: | ||
perl -pi -e 's/\e/\\E/g' tools/php_api_ref/.phpdoc/template/package-edition-map.twig | ||
|
||
- name: Commit | ||
run: | | ||
git config --global user.name "${GITHUB_ACTOR}" | ||
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com" | ||
git add docs/api/php_api/php_api_reference/ tools/php_api_ref/.phpdoc/template/package-edition-map.twig | ||
git commit -m "PHP API Ref HTML" | ||
#TODO: git add doc/api/rest_api/rest_api_reference/rest_api_reference.html | ||
#TODO: git commit -m "REST API Ref HTML" | ||
|
||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v7 | ||
with: | ||
token: ${{ secrets.EZROBOT_PAT }} | ||
title: "PHP API Ref ${{ steps.version_and_branches.outputs.version }}" | ||
body: "PHP API Reference update for ${{ steps.version_and_branches.outputs.version }}" | ||
branch: "${{ steps.version_and_branches.outputs.work_branch }}" | ||
base: "${{ steps.version_and_branches.outputs.base_branch }}" | ||
draft: false | ||
labels: 'Needs DOC review' |
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.