chore: enhance media service documentation and CI workflows

- Added documentation for GetAudioOutputConfiguration method, including a note on code duplication.
- Updated coverage workflow to include an ID for coverage checks and output the coverage percentage.
- Modified release workflow to allow manual triggering and improved version handling based on event type.
This commit is contained in:
0x524a
2025-12-02 01:14:37 -05:00
parent 808498d1a0
commit 202218e24e
3 changed files with 12 additions and 2 deletions
+2
View File
@@ -30,6 +30,7 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Check coverage percentage
id: coverage
run: |
if [ -f coverage.out ]; then
echo "📊 Coverage Report:"
@@ -37,6 +38,7 @@ jobs:
coverage=$(go tool cover -func=coverage.out | grep total | awk '{print $3}' | sed 's/%//')
echo "Total Coverage: ${coverage}%"
echo "percentage=${coverage}" >> $GITHUB_OUTPUT
# Set threshold to 50%
threshold=50
+8 -2
View File
@@ -243,7 +243,7 @@ jobs:
name: Build and Push Docker Image
needs: build
runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
if: (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')) || github.event_name == 'workflow_dispatch'
steps:
- name: Checkout code
uses: actions/checkout@v4
@@ -264,7 +264,13 @@ jobs:
- name: Get version
id: version
run: |
VERSION=${GITHUB_REF#refs/tags/v}
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
VERSION="${{ github.event.inputs.version }}"
# Remove 'v' prefix if present
VERSION=${VERSION#v}
else
VERSION=${GITHUB_REF#refs/tags/v}
fi
echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT
- name: Build and push
+2
View File
@@ -2046,6 +2046,8 @@ func (c *Client) GetMetadataConfigurationOptions(ctx context.Context, configurat
}
// GetAudioOutputConfiguration retrieves audio output configuration
//
//nolint:dupl // Similar structure to GetAudioSourceConfiguration but different types and operations
func (c *Client) GetAudioOutputConfiguration(ctx context.Context, configurationToken string) (*AudioOutputConfiguration, error) {
endpoint := c.mediaEndpoint
if endpoint == "" {