From a4d1c101fcf65e580bc86f5e9b3a7742c4a095dc Mon Sep 17 00:00:00 2001 From: Nico Miguelino Date: Fri, 26 Jun 2026 13:00:07 -0700 Subject: [PATCH] chore: add GitHub Actions workflows and Dependabot config - add checks workflow - add initialize-edge-app workflow - add update-edge-app workflow - add dependabot config for bun and github-actions --- .github/dependabot.yml | 20 ++++++++++++ .github/workflows/checks.yml | 18 ++++++++++ .github/workflows/initialize-edge-app.yml | 40 +++++++++++++++++++++++ .github/workflows/update-edge-app.yml | 38 +++++++++++++++++++++ 4 files changed, 116 insertions(+) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/checks.yml create mode 100644 .github/workflows/initialize-edge-app.yml create mode 100644 .github/workflows/update-edge-app.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..be27bdc --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,20 @@ +version: 2 + +updates: + - package-ecosystem: 'bun' + directory: '/' + schedule: + interval: 'monthly' + groups: + bun: + patterns: + - '*' + + - package-ecosystem: 'github-actions' + directory: '/' + schedule: + interval: 'monthly' + groups: + github-actions: + patterns: + - '*' diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml new file mode 100644 index 0000000..f08b3b4 --- /dev/null +++ b/.github/workflows/checks.yml @@ -0,0 +1,18 @@ +name: Checks + +on: + push: + branches: + - development + - main + pull_request: + branches: + - development + - main + +jobs: + checks: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + - uses: Screenly/edge-apps-actions/checks@v1 diff --git a/.github/workflows/initialize-edge-app.yml b/.github/workflows/initialize-edge-app.yml new file mode 100644 index 0000000..29fce8e --- /dev/null +++ b/.github/workflows/initialize-edge-app.yml @@ -0,0 +1,40 @@ +--- +name: Initialize Edge App + +on: + workflow_dispatch: + inputs: + environment: + description: Target environment for initialization + required: true + default: stage + type: choice + options: + - stage + - production + edge_app_name: + description: Edge App name (used for the CLI --name flag) + required: true + type: string + edge_app_title: + description: Display title for the Edge App instance + required: true + type: string + +run-name: Initializing ${{ inputs.edge_app_name }} in ${{ inputs.environment }} + +jobs: + initialize: + name: Initializing ${{ inputs.edge_app_name }} in ${{ inputs.environment }} + runs-on: ubuntu-latest + environment: ${{ inputs.environment }} + steps: + - uses: actions/checkout@v7 + with: + ref: ${{ inputs.environment == 'production' && 'main' || github.ref }} + - uses: Screenly/edge-apps-actions/initialize@v1 + 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 }} diff --git a/.github/workflows/update-edge-app.yml b/.github/workflows/update-edge-app.yml new file mode 100644 index 0000000..252a259 --- /dev/null +++ b/.github/workflows/update-edge-app.yml @@ -0,0 +1,38 @@ +--- +name: Update Edge App + +on: + workflow_dispatch: + push: + branches: + - development + - main + +run-name: Updating Qr Code App in ${{ github.event_name == 'workflow_dispatch' && 'stage' || (github.ref == 'refs/heads/main' && 'production' || 'stage') }} + +jobs: + deploy-stage: + name: Updating Qr Code App in stage + runs-on: ubuntu-latest + if: (github.event_name == 'push' && github.ref == 'refs/heads/development') || github.event_name == 'workflow_dispatch' + environment: stage + steps: + - uses: actions/checkout@v7 + - uses: Screenly/edge-apps-actions/update@v1 + with: + screenly_api_token: ${{ secrets.SCREENLY_API_TOKEN }} + environment: stage + delete_missing_settings: 'true' + + deploy-production: + name: Updating Qr Code App in production + runs-on: ubuntu-latest + if: github.event_name == 'push' && github.ref == 'refs/heads/main' + environment: production + steps: + - uses: actions/checkout@v7 + - uses: Screenly/edge-apps-actions/update@v1 + with: + screenly_api_token: ${{ secrets.SCREENLY_API_TOKEN }} + environment: production + delete_missing_settings: 'true'