-
Notifications
You must be signed in to change notification settings - Fork 467
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into 29672-block-editor-add-link-doesnt-show-wh…
…en-below-on-the-editor
- Loading branch information
Showing
219 changed files
with
9,669 additions
and
2,233 deletions.
There are no files selected for viewing
This file contains 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,32 @@ | ||
# Check GitHub API Rate Limit Action | ||
|
||
This GitHub Action allows you to check the current API rate limits for your GitHub account by querying the `/rate_limit` endpoint of the GitHub API. The action outputs the full JSON response, including rate limits for core, search, GraphQL, and other GitHub API resources. | ||
|
||
## Inputs | ||
|
||
| Input | Description | Required | Default | | ||
|--------|-------------|----------|---------| | ||
| `token` | The GitHub token to authenticate the API request. | true | `${{ github.token }}` | | ||
|
||
## Outputs | ||
|
||
The action outputs the full JSON response from the `/rate_limit` endpoint directly to the workflow log. | ||
|
||
## Usage | ||
|
||
Here’s an example of how to use this action in a GitHub workflow: | ||
|
||
```yaml | ||
name: Check GitHub API Rate Limits | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
check-rate-limits: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check API Rate Limit | ||
uses: your-repo/check-rate-limit-action@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} |
This file contains 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,15 @@ | ||
name: 'Check GitHub API Rate Limit' | ||
description: 'Outputs information on GitHub API /rate_limit endpoint' | ||
|
||
inputs: | ||
token: | ||
description: 'GitHub token to authenticate the API request' | ||
required: true | ||
default: ${{ github.token }} | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- run: | | ||
curl -s -H "Authorization: token ${{ inputs.token }}" https://api.github.com/rate_limit | ||
shell: bash |
This file contains 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 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 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 |
---|---|---|
|
@@ -64,6 +64,13 @@ jobs: | |
shell: bash | ||
run: | | ||
echo "Initializing..." | ||
# Check can be removed if we have resolved root cause | ||
# We cannot use a local github action for this as it is run before we checkout the repo | ||
# secrets.GITHUB_TOKEN is not available in composite workflows so it needs to be passed in. | ||
- name: Check API Rate Limit | ||
shell: bash | ||
run: | | ||
curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/rate_limit || true | ||
# This job checks for artifacts from previous builds and determines if they can be reused | ||
check-previous-build: | ||
|
@@ -123,17 +130,21 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v4 | ||
if: ${{ inputs.validation-level != 'none' }} | ||
|
||
# Execute the paths-filter step to determine changes | ||
- uses: dorny/[email protected] | ||
if: ${{ inputs.validation-level != 'none' }} | ||
id: filter | ||
with: | ||
filters: .github/filters.yaml | ||
list-files: 'escape' | ||
|
||
- name: Rewrite Filter | ||
id: filter-rewrite | ||
env: | ||
CICD_SKIP_TESTS: ${{ vars.CICD_SKIP_TESTS }} | ||
run: | | ||
echo "::group::Rewrite Fiter" | ||
# Default action outcomes based on paths-filter action outputs | ||
frontend=${{ steps.filter.outputs.frontend || 'true'}} | ||
cli=${{ steps.filter.outputs.cli || 'true' }} | ||
|
@@ -145,7 +156,7 @@ jobs: | |
# Check if the commit is to the master branch | ||
skip_tests=${CICD_SKIP_TESTS:-false} # Use environment variable, default to 'false' | ||
# The below line ensures that if skip_tests is true, all tests are set to false. | ||
# If skip_tests is true, set all tests to false | ||
if [ "$skip_tests" == "true" ]; then | ||
echo "Skipping tests as per CICD_SKIP_TESTS flag." | ||
frontend=false | ||
|
@@ -161,7 +172,7 @@ jobs: | |
backend=false | ||
build=false | ||
jvm_unit_test=false | ||
sdk_libs=false | ||
IFS=',' read -r -a custom_modules_list <<< "${{ inputs.custom-modules }}" | ||
for module in "${custom_modules_list[@]}"; do | ||
if [ "${module}" == "frontend" ]; then | ||
|
@@ -175,7 +186,7 @@ jobs: | |
elif [ "${module}" == "jvm_unit_test" ]; then | ||
jvm_unit_test=${{ steps.filter.outputs.jvm_unit_test }} | ||
elif [ "${module}" == "sdk_libs" ]; then | ||
sdk=${{ steps.filter.outputs.sdk_libs }} | ||
sdk_libs=${sdk_libs} | ||
fi | ||
done | ||
fi | ||
|
@@ -193,4 +204,5 @@ jobs: | |
echo "backend=${backend}" >> $GITHUB_OUTPUT | ||
echo "build=${build}" >> $GITHUB_OUTPUT | ||
echo "jvm_unit_test=${jvm_unit_test}" >> $GITHUB_OUTPUT | ||
echo "sdk_libs=${sdk_libs}" >> $GITHUB_OUTPUT | ||
echo "sdk_libs=${sdk_libs}" >> $GITHUB_OUTPUT | ||
echo "::endgroup::" |
This file contains 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 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 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 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 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 |
---|---|---|
|
@@ -13,16 +13,16 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: 'Setup git config' | ||
run: | | ||
git config user.name "${{ secrets.CI_MACHINE_USER }}" | ||
git config user.email "[email protected]" | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # Fetch all history for all branches | ||
|
||
- name: 'Setup git config' | ||
run: | | ||
git config user.name "${{ secrets.CI_MACHINE_USER }}" | ||
git config user.email "[email protected]" | ||
- name: Create or update main branch | ||
run: | | ||
# Check if 'main' branch exists | ||
|
@@ -35,5 +35,10 @@ jobs: | |
git checkout -b main origin/master | ||
fi | ||
# Push the updated main branch | ||
git push origin main --force | ||
- name: Push changes | ||
uses: ad-m/github-push-action@master | ||
with: | ||
github_token: ${{ secrets.CI_MACHINE_TOKEN }} | ||
branch: main | ||
force: true | ||
tags: true |
Oops, something went wrong.