From 53785782910b2d2ce30d240fd99db318a240a4a4 Mon Sep 17 00:00:00 2001 From: Nico Miguelino Date: Sat, 20 Jun 2026 17:33:53 -0700 Subject: [PATCH 1/2] chore: remove rss-reader leftovers - remove stale initialize-rss-reader-app.yml workflow - remove icon from old rss-reader location --- .../workflows/initialize-rss-reader-app.yml | 120 ------------------ edge-apps/rss-reader/static/img/icon.svg | 34 ----- 2 files changed, 154 deletions(-) delete mode 100644 .github/workflows/initialize-rss-reader-app.yml delete mode 100644 edge-apps/rss-reader/static/img/icon.svg diff --git a/.github/workflows/initialize-rss-reader-app.yml b/.github/workflows/initialize-rss-reader-app.yml deleted file mode 100644 index d33d079a4..000000000 --- a/.github/workflows/initialize-rss-reader-app.yml +++ /dev/null @@ -1,120 +0,0 @@ ---- -name: Initialize Custom RSS Reader App - -on: - workflow_dispatch: - inputs: - environment: - description: 'Environment to initialize in (stage or production)' - required: true - default: 'stage' - type: choice - options: - - stage - - production - - app_name: - description: 'App Name (used for instance title)' - required: true - type: string - default: 'BBC News' - - app_description: - description: 'App Description (used in manifest description)' - required: true - type: string - default: 'Latest news from BBC World Service' - - rss_title: - description: 'RSS Title (title to display in the app)' - required: true - type: string - default: 'BBC News' - - icon_url: - description: 'Icon URL (publicly accessible icon image)' - required: true - type: string - default: 'https://playground.srly.io/edge-apps/rss-reader/static/img/icon.svg' - - rss_url: - description: 'RSS Feed URL' - required: true - type: string - default: 'http://feeds.bbci.co.uk/news/rss.xml' - -run-name: Initialize RSS Reader - ${{ inputs.app_name }} in ${{ inputs.environment }} - -jobs: - deploy: - name: Initializing ${{ inputs.app_name }} in ${{ inputs.environment }} - runs-on: ubuntu-latest - environment: ${{ inputs.environment }} - env: - API_BASE_URL: ${{ inputs.environment == 'stage' && 'https://api.screenlyappstage.com' || 'https://api.screenlyapp.com' }} - APP_NAME: ${{ inputs.app_name }} - APP_PATH: edge-apps/rss-reader - SCREENLY_API_TOKEN: ${{ secrets.SCREENLY_API_TOKEN }} - MANIFEST_FILE_NAME: ${{ inputs.environment == 'stage' && 'screenly_qc.yml' || 'screenly.yml' }} - - steps: - - name: Checkout Repository - uses: actions/checkout@v6 - with: - ref: master - - - name: Setup yq - uses: ./.github/actions/setup-yq - - - name: Update manifest file with custom values - run: | - MANIFEST_FILE="${{ env.APP_PATH }}/${{ env.MANIFEST_FILE_NAME }}" - yq -i 'del(.id)' "$MANIFEST_FILE" - yq -i '.description = "${{ inputs.app_description }}"' "$MANIFEST_FILE" - yq -i '.icon = "${{ inputs.icon_url }}"' "$MANIFEST_FILE" - yq -i '.settings.rss_url.default_value = "${{ inputs.rss_url }}"' "$MANIFEST_FILE" - yq -i '.settings.rss_title.default_value = "${{ inputs.rss_title }}"' "$MANIFEST_FILE" - - - name: Show updated manifest - run: cat "${{ env.APP_PATH }}/${{ env.MANIFEST_FILE_NAME }}" - - - name: Set up Bun - uses: oven-sh/setup-bun@v2 - - - name: Install dependencies - working-directory: ${{ env.APP_PATH }} - run: bun install --frozen-lockfile - - - name: Create Edge App - uses: screenly/cli@master - with: - screenly_api_token: ${{ env.SCREENLY_API_TOKEN }} - cli_commands: edge-app create --name="${{ env.APP_NAME }}" --in-place --path="${{ env.APP_PATH }}" - - - name: Build - working-directory: ${{ env.APP_PATH }} - run: bun run build - - - name: Deploy Edge App - uses: screenly/cli@master - with: - screenly_api_token: ${{ env.SCREENLY_API_TOKEN }} - cli_commands: edge-app deploy --path="${{ env.APP_PATH }}/dist" - - - name: Log manifest after creation - run: cat "${{ env.APP_PATH }}/dist/${{ env.MANIFEST_FILE_NAME }}" - - - name: Create Instance - uses: screenly/cli@master - with: - screenly_api_token: ${{ env.SCREENLY_API_TOKEN }} - cli_commands: edge-app instance create --path="${{ env.APP_PATH }}" --name="${{ inputs.app_name }}" - - - name: Update Instance - uses: screenly/cli@master - with: - screenly_api_token: ${{ env.SCREENLY_API_TOKEN }} - cli_commands: edge-app instance update --path="${{ env.APP_PATH }}" - - - name: Log instance.yml - run: cat "${{ env.APP_PATH }}/instance.yml" diff --git a/edge-apps/rss-reader/static/img/icon.svg b/edge-apps/rss-reader/static/img/icon.svg deleted file mode 100644 index 1a6f8019f..000000000 --- a/edge-apps/rss-reader/static/img/icon.svg +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - From 630f0d47664ed4d8b6262c41216a79b09002120e Mon Sep 17 00:00:00 2001 From: Nico Miguelino Date: Sat, 20 Jun 2026 17:35:47 -0700 Subject: [PATCH 2/2] chore: remove stale update-rss-reader-apps workflow --- .github/workflows/update-rss-reader-apps.yml | 181 ------------------- 1 file changed, 181 deletions(-) delete mode 100644 .github/workflows/update-rss-reader-apps.yml diff --git a/.github/workflows/update-rss-reader-apps.yml b/.github/workflows/update-rss-reader-apps.yml deleted file mode 100644 index f545eaaec..000000000 --- a/.github/workflows/update-rss-reader-apps.yml +++ /dev/null @@ -1,181 +0,0 @@ ---- -name: Update RSS Reader Apps - -on: - workflow_dispatch: - inputs: - environment: - description: 'Environment to update (stage or production)' - required: true - default: 'stage' - type: choice - options: - - stage - - production - - app_key: - description: "App key (leave empty to update ALL apps, or enter one key like 'bbc-news')" - required: false - type: string - - override_app_name: - description: 'Override app name (optional, leave empty to use deployed-apps.yml)' - required: false - type: string - - override_description: - description: 'Override app description (optional, leave empty to use deployed-apps.yml)' - required: false - type: string - - override_rss_title: - description: 'Override RSS title (optional, leave empty to use deployed-apps.yml)' - required: false - type: string - - override_icon_url: - description: 'Override icon URL (optional, leave empty to use deployed-apps.yml)' - required: false - type: string - - override_rss_url: - description: 'Override RSS URL (optional, leave empty to use deployed-apps.yml)' - required: false - type: string - -run-name: Update RSS Reader${{ inputs.app_key && format(' - {0}', inputs.app_key) || 's (ALL)' }} in ${{ inputs.environment }} - -jobs: - prepare: - name: Prepare App Matrix - runs-on: ubuntu-latest - outputs: - matrix: ${{ steps.set-matrix.outputs.matrix }} - app_count: ${{ steps.set-matrix.outputs.app_count }} - - steps: - - uses: actions/checkout@v6 - with: - ref: master - - - name: Setup yq - uses: ./.github/actions/setup-yq - - - name: Generate App Matrix - id: set-matrix - run: | - CONFIG_FILE="edge-apps/rss-reader/deployed-apps.yml" - APP_KEY_INPUT="${{ inputs.app_key }}" - ENVIRONMENT="${{ inputs.environment }}" - - if [ -n "$APP_KEY_INPUT" ]; then - if ! yq ".apps.$APP_KEY_INPUT" "$CONFIG_FILE" | grep -q "ids:" || \ - [ "$(yq -r ".apps.$APP_KEY_INPUT.ids | has(\"$ENVIRONMENT\")" "$CONFIG_FILE")" != "true" ]; then - echo "Error: App key '$APP_KEY_INPUT' missing 'ids.$ENVIRONMENT'" - exit 1 - fi - - MATRIX=$(yq -o=json -I=0 '.apps | to_entries | map(select(.key == "'"$APP_KEY_INPUT"'") | {"key": .key, "id": .value.ids.'"$ENVIRONMENT"'})' "$CONFIG_FILE") - APP_COUNT=1 - else - MATRIX=$(yq -o=json -I=0 '.apps | to_entries | map(select(.value.ids and (.value.ids | has("'"$ENVIRONMENT"'"))) | {"key": .key, "id": .value.ids.'"$ENVIRONMENT"'})' "$CONFIG_FILE") - APP_COUNT=$(echo "$MATRIX" | yq 'length') - - if [ "$APP_COUNT" -eq 0 ]; then - echo "No apps found with IDs configured for environment: $ENVIRONMENT" - exit 1 - fi - fi - - echo "matrix=$MATRIX" >> "$GITHUB_OUTPUT" - echo "app_count=$APP_COUNT" >> "$GITHUB_OUTPUT" - - deploy: - name: Update ${{ matrix.app.key }} - needs: prepare - runs-on: ubuntu-latest - if: needs.prepare.outputs.app_count > 0 - environment: ${{ inputs.environment }} - strategy: - matrix: - app: ${{ fromJson(needs.prepare.outputs.matrix) }} - fail-fast: false - env: - APP_PATH: edge-apps/rss-reader - MANIFEST_FILE_NAME: ${{ inputs.environment == 'stage' && 'screenly_qc.yml' || 'screenly.yml' }} - SCREENLY_API_TOKEN: ${{ secrets.SCREENLY_API_TOKEN }} - - steps: - - uses: actions/checkout@v6 - with: - ref: master - - - name: Setup yq - uses: ./.github/actions/setup-yq - - - name: Update manifest from config - run: | - CONFIG_FILE="${{ env.APP_PATH }}/deployed-apps.yml" - MANIFEST_FILE="${{ env.APP_PATH }}/${{ env.MANIFEST_FILE_NAME }}" - APP_ID="${{ matrix.app.id }}" - APP_KEY="${{ matrix.app.key }}" - - CONFIG_APP_NAME=$(yq ".apps.$APP_KEY.app_name" "$CONFIG_FILE") - CONFIG_DESC=$(yq ".apps.$APP_KEY.description" "$CONFIG_FILE") - CONFIG_RSS_TITLE=$(yq ".apps.$APP_KEY.rss_title" "$CONFIG_FILE") - CONFIG_ICON=$(yq ".apps.$APP_KEY.icon_url" "$CONFIG_FILE") - CONFIG_RSS_URL=$(yq ".apps.$APP_KEY.rss_url" "$CONFIG_FILE") - - FINAL_APP_NAME="${{ inputs.override_app_name }}" - [ -z "$FINAL_APP_NAME" ] && FINAL_APP_NAME="$CONFIG_APP_NAME" - - FINAL_DESC="${{ inputs.override_description }}" - [ -z "$FINAL_DESC" ] && FINAL_DESC="$CONFIG_DESC" - - FINAL_RSS_TITLE="${{ inputs.override_rss_title }}" - [ -z "$FINAL_RSS_TITLE" ] && FINAL_RSS_TITLE="$CONFIG_RSS_TITLE" - - FINAL_ICON="${{ inputs.override_icon_url }}" - [ -z "$FINAL_ICON" ] && FINAL_ICON="$CONFIG_ICON" - - FINAL_RSS_URL="${{ inputs.override_rss_url }}" - [ -z "$FINAL_RSS_URL" ] && FINAL_RSS_URL="$CONFIG_RSS_URL" - - yq -i '.id = "'"$APP_ID"'"' "$MANIFEST_FILE" - yq -i '.description = "'"$FINAL_DESC"'"' "$MANIFEST_FILE" - yq -i '.icon = "'"$FINAL_ICON"'"' "$MANIFEST_FILE" - yq -i '.settings.rss_url.default_value = "'"$FINAL_RSS_URL"'"' "$MANIFEST_FILE" - yq -i '.settings.rss_title.default_value = "'"$FINAL_RSS_TITLE"'"' "$MANIFEST_FILE" - - - name: Show updated manifest - run: cat "${{ env.APP_PATH }}/${{ env.MANIFEST_FILE_NAME }}" - - - name: Set up Bun - uses: oven-sh/setup-bun@v2 - - - name: Install dependencies - working-directory: ${{ env.APP_PATH }} - run: bun install --frozen-lockfile - - - name: Build - working-directory: ${{ env.APP_PATH }} - run: bun run build - - - name: Deploy Edge App - uses: screenly/cli@master - with: - screenly_api_token: ${{ env.SCREENLY_API_TOKEN }} - cli_commands: edge-app deploy --path="${{ env.APP_PATH }}/dist" --delete-missing-settings=true - - summary: - name: Deployment Summary - needs: [prepare, deploy] - runs-on: ubuntu-latest - if: always() - - steps: - - name: Summary - run: | - echo "Environment: ${{ inputs.environment }}" - echo "Apps processed: ${{ needs.prepare.outputs.app_count }}" - echo "Deployment status: ${{ needs.deploy.result }}"