-
Notifications
You must be signed in to change notification settings - Fork 1
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
chore: publish docs artifact #87
Conversation
Caution Review failedThe pull request is closed. WalkthroughThis pull request introduces a new GitHub Actions workflow file named Changes
Possibly related PRs
Suggested reviewers
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (3)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Outside diff range and nitpick comments (2)
.github/workflows/docs.yml (2)
3-8
: Consider restricting PR triggers to specific pathsThe workflow currently runs on all PRs and pushes. For efficiency, consider adding path filters to trigger only when documentation-related files change.
on: pull_request: + paths: + - '**/*.kt' + - '**/*.kts' + - '.github/workflows/docs.yml' push: branches: - main tags: - '*'
45-47
: Consider adding path validation for sourcePathEnsure the dokka output directory exists before upload to prevent workflow failures.
- name: Upload Documentation uses: ably/sdk-upload-action@v2 + if: hashFiles('chat-android/build/dokka/html/**/*') != '' with: sourcePath: chat-android/build/dokka/html githubToken: ${{ secrets.GITHUB_TOKEN }} artifactName: dokka
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (3)
.github/workflows/docs.yml
(1 hunks)chat-android/build.gradle.kts
(1 hunks)gradle/libs.versions.toml
(1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.4)
.github/workflows/docs.yml
36-36: the runner of "aws-actions/configure-aws-credentials@v1" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🔇 Additional comments (2)
chat-android/build.gradle.kts (1)
11-11
: LGTM: Dokka plugin integration
The Dokka plugin is correctly added to generate Kotlin documentation.
gradle/libs.versions.toml (1)
66-66
: LGTM: Dokka plugin version declaration
The Dokka plugin version 1.9.20 is appropriate and recent.
0194b3d
to
c10e97c
Compare
Code Coverage
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (2)
.github/workflows/docs.yml (2)
14-17
: Consider removing unnecessary 'deployments' permissionThe workflow only needs permissions for id-token (AWS authentication) and contents (repo access). The 'deployments' permission appears unnecessary for documentation publishing.
permissions: - deployments: write id-token: write contents: read
32-34
: Add error handling for documentation generationConsider adding error handling and build scan publication for better debugging capabilities.
- name: Build Documentation - run: ./gradlew dokkaHtml + run: | + ./gradlew dokkaHtml --scan + if [ $? -ne 0 ]; then + echo "Documentation generation failed. Check the build scan above." + exit 1 + fi
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (3)
.github/workflows/docs.yml
(1 hunks)chat-android/build.gradle.kts
(1 hunks)gradle/libs.versions.toml
(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
- gradle/libs.versions.toml
- chat-android/build.gradle.kts
🧰 Additional context used
🪛 actionlint (1.7.4)
.github/workflows/docs.yml
36-36: the runner of "aws-actions/configure-aws-credentials@v1" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🔇 Additional comments (4)
.github/workflows/docs.yml (4)
1-9
: LGTM! Workflow triggers are well configured
The workflow triggers are appropriately set up to build documentation on PRs, main branch pushes, and tag releases.
19-31
: LGTM! Setup steps are well configured
The checkout and setup steps are using recent action versions and proper configurations.
35-41
:
Update aws-actions/configure-aws-credentials to latest version
The current version (@v1) is outdated. Update to the latest version to ensure security fixes and improvements.
- uses: aws-actions/configure-aws-credentials@v1
+ uses: aws-actions/configure-aws-credentials@v4
🧰 Tools
🪛 actionlint (1.7.4)
36-36: the runner of "aws-actions/configure-aws-credentials@v1" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
42-47
: Verify dokka output directory path
The upload step assumes the path chat-android/build/dokka/html
exists. Let's verify this is the correct output path.
c10e97c
to
26ad0c5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (3)
.github/workflows/docs.yml
(1 hunks)chat-android/build.gradle.kts
(1 hunks)gradle/libs.versions.toml
(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
- chat-android/build.gradle.kts
- gradle/libs.versions.toml
🧰 Additional context used
🪛 actionlint (1.7.4)
.github/workflows/docs.yml
36-36: the runner of "aws-actions/configure-aws-credentials@v1" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🔇 Additional comments (5)
.github/workflows/docs.yml (5)
1-9
: LGTM! Workflow triggers are well configured.
The workflow triggers are appropriately set up to generate documentation for all relevant events: PRs, main branch updates, and releases (tags).
19-28
: LGTM! Latest versions of actions are used.
The setup steps are well configured with:
- Latest checkout action (v4)
- Latest Java setup action (v4)
- Appropriate Java distribution and version
42-47
: LGTM! Documentation upload is securely configured.
The upload configuration is well structured with:
- Correct Dokka output path
- Secure token usage
- Latest version of the upload action
35-41
:
Critical: Update AWS configuration.
Two issues need to be addressed:
- The AWS credentials action is using an outdated version
- There's a typo in the role name ("koltin" instead of "kotlin")
Apply these fixes:
- uses: aws-actions/configure-aws-credentials@v1
+ uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: eu-west-2
- role-to-assume: arn:aws:iam::${{ secrets.ABLY_AWS_ACCOUNT_ID_SDK }}:role/ably-sdk-builds-ably-chat-koltin
+ role-to-assume: arn:aws:iam::${{ secrets.ABLY_AWS_ACCOUNT_ID_SDK }}:role/ably-sdk-builds-ably-chat-kotlin
role-session-name: "${{ github.run_id }}-${{ github.run_number }}"
🧰 Tools
🪛 actionlint (1.7.4)
36-36: the runner of "aws-actions/configure-aws-credentials@v1" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
10-18
: LGTM! Job configuration follows security best practices.
The job configuration is well structured with:
- Appropriate exclusion of Dependabot PRs to avoid redundant builds
- Minimal required permissions following the principle of least privilege
Let's verify if these are the minimal required permissions:
✅ Verification successful
Let me analyze the workflow steps and their permission requirements:
actions/checkout@v4
: Needscontents: read
actions/setup-java@v4
: No special permissionsgradle/gradle-build-action@v2
: No special permissionsaws-actions/configure-aws-credentials@v1
: Needsid-token: write
for OIDC authenticationably/sdk-upload-action@v2
: Needsdeployments: write
for uploading documentation
Let me verify the permissions of the custom action:
Permissions configuration is correctly minimized for the workflow requirements
The workflow permissions are precisely aligned with the operational needs:
contents: read
- Required for checkout actionid-token: write
- Required for AWS credentials configurationdeployments: write
- Required for documentation deployment
Each permission granted serves a specific purpose in the workflow, and no unnecessary permissions are included.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check if the workflow uses any additional permissions in its steps
# Search for potential permission requirements in the used actions
rg -A 5 "permissions:|uses:" .github/workflows/docs.yml
Length of output: 1038
Script:
#!/bin/bash
# Check the custom action's metadata for any additional permission requirements
curl -s https://raw.githubusercontent.com/ably/sdk-upload-action/v2/action.yml | grep -A 5 "permissions:"
Length of output: 105
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the github action CI in process or hanged?
Since yesterday, it's showing checking for ability to merge automatically
and
Processing updates
at the top : (
85ff3d8
to
c6f7db5
Compare
Looks like GitHub bug, pushed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Added action to publish autogenerated docs
Summary by CodeRabbit
New Features
Documentation