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:
@@ -30,6 +30,7 @@ jobs:
|
|||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Check coverage percentage
|
- name: Check coverage percentage
|
||||||
|
id: coverage
|
||||||
run: |
|
run: |
|
||||||
if [ -f coverage.out ]; then
|
if [ -f coverage.out ]; then
|
||||||
echo "📊 Coverage Report:"
|
echo "📊 Coverage Report:"
|
||||||
@@ -37,6 +38,7 @@ jobs:
|
|||||||
|
|
||||||
coverage=$(go tool cover -func=coverage.out | grep total | awk '{print $3}' | sed 's/%//')
|
coverage=$(go tool cover -func=coverage.out | grep total | awk '{print $3}' | sed 's/%//')
|
||||||
echo "Total Coverage: ${coverage}%"
|
echo "Total Coverage: ${coverage}%"
|
||||||
|
echo "percentage=${coverage}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
# Set threshold to 50%
|
# Set threshold to 50%
|
||||||
threshold=50
|
threshold=50
|
||||||
|
|||||||
@@ -243,7 +243,7 @@ jobs:
|
|||||||
name: Build and Push Docker Image
|
name: Build and Push Docker Image
|
||||||
needs: build
|
needs: build
|
||||||
runs-on: ubuntu-latest
|
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:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -264,7 +264,13 @@ jobs:
|
|||||||
- name: Get version
|
- name: Get version
|
||||||
id: version
|
id: version
|
||||||
run: |
|
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
|
echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Build and push
|
- name: Build and push
|
||||||
|
|||||||
@@ -2046,6 +2046,8 @@ func (c *Client) GetMetadataConfigurationOptions(ctx context.Context, configurat
|
|||||||
}
|
}
|
||||||
|
|
||||||
// GetAudioOutputConfiguration retrieves audio output configuration
|
// 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) {
|
func (c *Client) GetAudioOutputConfiguration(ctx context.Context, configurationToken string) (*AudioOutputConfiguration, error) {
|
||||||
endpoint := c.mediaEndpoint
|
endpoint := c.mediaEndpoint
|
||||||
if endpoint == "" {
|
if endpoint == "" {
|
||||||
|
|||||||
Reference in New Issue
Block a user