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
23 changes: 1 addition & 22 deletions .github/workflows/initialize-edge-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,28 +31,7 @@ jobs:
steps:
- uses: actions/checkout@v6
with:
ref: ${{ inputs.environment == 'production' && 'main' || 'development' }}
# TODO: Refactor into Screenly/edge-apps-actions/whoami@v1
# See https://github.com/Screenly/edge-apps-actions/issues/8
- name: Screenly API whoami
env:
SCREENLY_API_TOKEN: ${{ secrets.SCREENLY_API_TOKEN }}
API_BASE_URL: ${{ vars.API_BASE_URL }}
run: |
set -euo pipefail
current_user=$(
curl -fsSL -H "Authorization: Token ${SCREENLY_API_TOKEN}" \
"${API_BASE_URL}/api/v4.1/users" \
| jq -r '.[0] | "\(.first_name) \(.last_name) <\(.email)>"'
)
echo "Current User: ${current_user}"
current_team=$(
curl -fsSL -H "Authorization: Token ${SCREENLY_API_TOKEN}" \
"${API_BASE_URL}/api/v4.1/teams" \
| jq -r '.[] | select(.is_current == true)
| "\(.name) (\(.domain))"'
)
echo "Current Team: ${current_team}"
ref: ${{ inputs.environment == 'production' && 'main' || github.ref }}
- uses: Screenly/edge-apps-actions/initialize@v1
with:
screenly_api_token: ${{ secrets.SCREENLY_API_TOKEN }}
Expand Down
42 changes: 0 additions & 42 deletions .github/workflows/update-edge-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,6 @@ jobs:
environment: stage
steps:
- uses: actions/checkout@v6
# TODO: Refactor into Screenly/edge-apps-actions/whoami@v1
# See https://github.com/Screenly/edge-apps-actions/issues/8
- name: Screenly API whoami
env:
SCREENLY_API_TOKEN: ${{ secrets.SCREENLY_API_TOKEN }}
API_BASE_URL: ${{ vars.API_BASE_URL }}
run: |
set -euo pipefail
current_user=$(
curl -fsSL -H "Authorization: Token ${SCREENLY_API_TOKEN}" \
"${API_BASE_URL}/api/v4.1/users" \
| jq -r '.[0] | "\(.first_name) \(.last_name) <\(.email)>"'
)
echo "Current User: ${current_user}"
current_team=$(
curl -fsSL -H "Authorization: Token ${SCREENLY_API_TOKEN}" \
"${API_BASE_URL}/api/v4.1/teams" \
| jq -r '.[] | select(.is_current == true)
| "\(.name) (\(.domain))"'
)
echo "Current Team: ${current_team}"
- uses: Screenly/edge-apps-actions/update@v1
with:
screenly_api_token: ${{ secrets.SCREENLY_API_TOKEN }}
Expand All @@ -52,27 +31,6 @@ jobs:
environment: production
steps:
- uses: actions/checkout@v6
# TODO: Refactor into Screenly/edge-apps-actions/whoami@v1
# See https://github.com/Screenly/edge-apps-actions/issues/8
- name: Screenly API whoami
env:
SCREENLY_API_TOKEN: ${{ secrets.SCREENLY_API_TOKEN }}
API_BASE_URL: ${{ vars.API_BASE_URL }}
run: |
set -euo pipefail
current_user=$(
curl -fsSL -H "Authorization: Token ${SCREENLY_API_TOKEN}" \
"${API_BASE_URL}/api/v4.1/users" \
| jq -r '.[0] | "\(.first_name) \(.last_name) <\(.email)>"'
)
echo "Current User: ${current_user}"
current_team=$(
curl -fsSL -H "Authorization: Token ${SCREENLY_API_TOKEN}" \
"${API_BASE_URL}/api/v4.1/teams" \
| jq -r '.[] | select(.is_current == true)
| "\(.name) (\(.domain))"'
)
echo "Current Team: ${current_team}"
- uses: Screenly/edge-apps-actions/update@v1
with:
screenly_api_token: ${{ secrets.SCREENLY_API_TOKEN }}
Expand Down