Skip to content

Commit

Permalink
add app_id and installation_id to cli workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
maudem committed Jul 3, 2024
1 parent 1a2b976 commit 02fb3d9
Show file tree
Hide file tree
Showing 3 changed files with 88 additions and 2 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/deploy-transportation-app-qc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
name: Deploy transportation app (QC)

on:
push:
branches:
- 'master'
paths:
- 'edge-apps/transportation/**'
- '.github/workflows/deploy-transportation-qc.yml'

jobs:
deploy:
runs-on: ubuntu-latest
env:
APP_ID: '01J16GZP85W98XGW641Q7XC7ZT'
INSTALLATION_ID: '01J16GZPMC2FCATQGP1HWZ14K0'
APP_PATH: 'edge-apps/transportation'

steps:
- name: Checkout Code
uses: actions/checkout@v3

- name: Deploy Edge App
uses: screenly/cli@master
with:
screenly_api_token: ${{ secrets.SCREENLY_API_TOKEN_AUTOMATED_QC }}
# yamllint disable-line rule:line-length
cli_commands: edge-app upload --app-id=${{ env.APP_ID }} --path=${{ env.APP_PATH }}

- name: List Versions
uses: screenly/cli@master
with:
screenly_api_token: ${{ secrets.SCREENLY_API_TOKEN_AUTOMATED_QC }}
# yamllint disable-line rule:line-length
cli_commands: edge-app version list --app-id=${{ env.APP_ID }}

- name: Promote Edge App
uses: screenly/cli@master
with:
screenly_api_token: ${{ secrets.SCREENLY_API_TOKEN_AUTOMATED_QC }}
# yamllint disable-line rule:line-length
cli_commands: edge-app version promote --latest --installation-id=${{ env.INSTALLATION_ID }} --path=${{ env.APP_PATH }}
43 changes: 43 additions & 0 deletions .github/workflows/deploy-transportation-app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
name: Deploy transportation app

on:
push:
branches:
- 'master'
paths:
- 'edge-apps/transportation/**'
- '.github/workflows/transportation.yml'

jobs:
deploy:
runs-on: ubuntu-latest
env:
APP_ID: '01J16GZP85W98XGW641Q7XC7ZT'
INSTALLATION_ID: '01J16GZPMC2FCATQGP1HWZ14K0'
APP_PATH: 'edge-apps/transportation'

steps:
- name: Checkout Code
uses: actions/checkout@v3

- name: Deploy Edge App
uses: screenly/cli@master
with:
screenly_api_token: ${{ secrets.SCREENLY_API_TOKEN_PRODUCTION }}
# yamllint disable-line rule:line-length
cli_commands: edge-app upload --app-id=${{ env.APP_ID }} --path=${{ env.APP_PATH }}

- name: List Versions
uses: screenly/cli@master
with:
screenly_api_token: ${{ secrets.SCREENLY_API_TOKEN_PRODUCTION }}
# yamllint disable-line rule:line-length
cli_commands: edge-app version list --app-id=${{ env.APP_ID }}

- name: Promote Edge App
uses: screenly/cli@master
with:
screenly_api_token: ${{ secrets.SCREENLY_API_TOKEN_PRODUCTION }}
# yamllint disable-line rule:line-length
cli_commands: edge-app version promote --latest --installation-id=${{ env.INSTALLATION_ID }} --path=${{ env.APP_PATH }}
4 changes: 2 additions & 2 deletions edge-apps/transportation/screenly.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
app_id: 01J16GZP85W98XGW641Q7XC7ZT
installation_id: 01J16GZPMC2FCATQGP1HWZ14K0
app_id:
installation_id:
entrypoint: index.html
description: Displays AC Bus Status.
icon: https://playground.srly.io/edge-apps/tfl-bus-status/static/images/icon.svg
Expand Down

0 comments on commit 02fb3d9

Please sign in to comment.