Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit 42367c3

Browse files
committed
Test scarf push
1 parent 01d7b99 commit 42367c3

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.github/workflows/scarf-push.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Push To Scarf
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
repo_owner:
7+
description: Repo Owner
8+
required: true
9+
type: string
10+
app_name:
11+
description: App Name
12+
required: true
13+
type: string
14+
15+
jobs:
16+
bake:
17+
runs-on: ubuntu-latest
18+
steps:
19+
-
20+
name: Push to Scarf
21+
id: push_scarf
22+
run: |
23+
PACKAGE_UUID=$(curl -s -H "Authorization: Bearer ${SCARF_TOKEN}" https://scarf.sh/api/v1/organizations/linuxserver-ci/packages | jq -r '.[] | select(.name=="${{ inputs.repo_owner }}/${{ inputs.app_name }}") | .uuid')
24+
if [ -z "${PACKAGE_UUID}" ]; then
25+
echo "Adding package to Scarf.sh"
26+
curl -vX POST https://scarf.sh/api/v1/organizations/linuxserver-ci/packages -H "Authorization: Bearer ${SCARF_TOKEN}" -H "Content-Type: application/json" \
27+
-d '{"name":"${{ inputs.repo_owner }}/${{ inputs.app_name }}","shortDescription":"example description","libraryType":"docker","website":"https://github.com/${{ inputs.repo_owner }}/docker-${{ inputs.app_name }}","backendUrl":"https://ghcr.io/${{ inputs.repo_owner }}/${{ inputs.app_name }}","publicUrl":"https://lscr.io/${{ inputs.repo_owner }}/${{ inputs.app_name }}"}'
28+
else
29+
echo "Package already exists on Scarf.sh"
30+
fi

0 commit comments

Comments
 (0)