Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: Screenly/edge-apps-actions/checks@v1
- uses: Screenly/edge-apps-actions/checks@v26.10.0
7 changes: 4 additions & 3 deletions .github/workflows/initialize-edge-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,12 @@ jobs:
environment: ${{ inputs.environment }}
steps:
- uses: actions/checkout@v7
with:
ref: ${{ inputs.environment == 'production' && 'main' || github.ref }}
- uses: Screenly/edge-apps-actions/initialize@v1
- uses: Screenly/edge-apps-actions/initialize@v26.10.0
Comment thread
salmanfarisvp marked this conversation as resolved.
with:
screenly_api_token: ${{ secrets.SCREENLY_API_TOKEN }}
edge_app_name: ${{ inputs.edge_app_name }}
edge_app_title: ${{ inputs.edge_app_title }}
environment: ${{ inputs.environment }}
# First create: leave STAGE_EDGE_APP_ID / PRODUCTION_EDGE_APP_ID unset
# so this is "". After create: set the matching var to the printed id.
edge_app_id: ${{ (inputs.environment == 'production' && vars.PRODUCTION_EDGE_APP_ID) || (inputs.environment == 'stage' && vars.STAGE_EDGE_APP_ID) || '' }}
26 changes: 20 additions & 6 deletions .github/workflows/update-edge-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,48 @@ on:
workflow_dispatch:
push:
branches:
- development
- main
tags:
- 'v[0-9]*'
Comment thread
salmanfarisvp marked this conversation as resolved.

run-name: Updating Clock App in ${{ github.event_name == 'workflow_dispatch' && 'stage' || (github.ref == 'refs/heads/main' && 'production' || 'stage') }}
run-name: Updating Clock App in ${{ (github.event_name == 'push' && !github.event.deleted && startsWith(github.ref, 'refs/tags/v')) && 'production' || 'stage' }}

jobs:
deploy-stage:
name: Updating Clock App in stage
runs-on: ubuntu-latest
if: (github.event_name == 'push' && github.ref == 'refs/heads/development') || github.event_name == 'workflow_dispatch'
if: (github.event_name == 'push' && github.ref == 'refs/heads/main') || github.event_name == 'workflow_dispatch'
environment: stage
steps:
- uses: actions/checkout@v7
- uses: Screenly/edge-apps-actions/update@v1
- uses: Screenly/edge-apps-actions/update@v26.10.0
with:
screenly_api_token: ${{ secrets.SCREENLY_API_TOKEN }}
environment: stage
delete_missing_settings: 'true'
edge_app_id: ${{ vars.STAGE_EDGE_APP_ID }}

deploy-production:
name: Updating Clock App in production
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
if: github.event_name == 'push' && !github.event.deleted && startsWith(github.ref, 'refs/tags/v')
environment: production
steps:
- uses: actions/checkout@v7
- uses: Screenly/edge-apps-actions/update@v1
with:
fetch-depth: 0
- name: Verify tag is on the default branch
env:
DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
run: |
git fetch --no-tags origin "$DEFAULT_BRANCH"
if ! git merge-base --is-ancestor HEAD FETCH_HEAD; then
echo "Tag $GITHUB_REF_NAME is not on $DEFAULT_BRANCH; refusing to deploy to production."
exit 1
fi
- uses: Screenly/edge-apps-actions/update@v26.10.0
with:
screenly_api_token: ${{ secrets.SCREENLY_API_TOKEN }}
environment: production
delete_missing_settings: 'true'
edge_app_id: ${{ vars.PRODUCTION_EDGE_APP_ID }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ node_modules/
dist/
*.log
.DS_Store
mock-data.yml
static/js/*.js
static/js/*.js.map
screenshots/*.png
.env
17 changes: 11 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
[![Version](https://img.shields.io/github/v/release/Screenly/clock-app)](https://github.com/Screenly/clock-app/releases/latest)

# Screenly Clock App

![Clock App Preview](/screenshots/1920x1080.webp)
Comment thread
salmanfarisvp marked this conversation as resolved.
Comment thread
Copilot marked this conversation as resolved.

## Getting Started

```bash
Expand All @@ -20,12 +24,13 @@ screenly edge-app instance create

The app accepts the following settings via `screenly.yml`:

| Setting | Description | Type | Default |
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | ------- |
| `openweathermap_api_key` | OpenWeatherMap API key to access weather data and location information. Get your API key from the [OpenWeatherMap API](https://openweathermap.org/api) | optional | - |
| `override_locale` | Override the default locale with a supported language code | optional | `en` |
| `override_timezone` | Override the default timezone with a supported timezone identifier (e.g., `Europe/London`, `America/New_York`). Defaults to the system timezone if left blank | optional | - |
| `unit` | Measurement unit for temperature display: `auto` (automatically determined based on location), `metric` (Celsius), or `imperial` (Fahrenheit) | optional, advanced | `auto` |
| Setting | Description | Type | Default |
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | ------------- |
| `unit` | Measurement unit for temperature display: `auto` (automatically determined based on location), `metric` (Celsius), or `imperial` (Fahrenheit) | optional | `auto` |
| `style` | Visual style of the clock: `traditional`, `modern`, or `minimal` | optional | `traditional` |
| `override_locale` | Override the default locale with a supported language code | optional, advanced | `en` |
| `override_timezone` | Override the default timezone with a supported timezone identifier (e.g., `Europe/London`, `America/New_York`). Defaults to the system timezone if left blank | optional, advanced | - |
| `openweathermap_api_key` | OpenWeatherMap API key to access weather data and location information. Get your API key from the [OpenWeatherMap API](https://openweathermap.org/api) | optional, advanced | - |

**Note:** When `unit` is set to `auto` (default), temperature units are automatically determined based on the device's location. The following countries use Fahrenheit: United States (US), Bahamas (BS), Cayman Islands (KY), Liberia (LR), Palau (PW), Federated States of Micronesia (FM), and Marshall Islands (MH). All other countries use Celsius.

Expand Down
Loading
Loading