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

Commit 4d17a49

Browse files
committed
Deal with dispatch inputs
1 parent a79d24e commit 4d17a49

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

.github/workflows/scarf-push.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,12 @@ jobs:
1919
-
2020
name: Push to Scarf
2121
id: push_scarf
22-
env:
23-
SCARF_TOKEN: ${{ secrets.SCARF_TOKEN }}
2422
run: |
25-
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')
23+
PACKAGE_UUID=$(curl -s -H "Authorization: Bearer ${{ secrets.SCARF_TOKEN }}" https://scarf.sh/api/v1/organizations/linuxserver-ci/packages | jq -r '.[] | select(.name=="${{ github.event.inputs.repo_owner }}/${{ github.event.inputs.app_name }}") | .uuid')
2624
if [ -z "${PACKAGE_UUID}" ]; then
2725
echo "Adding package to Scarf.sh"
28-
curl -vX POST https://scarf.sh/api/v1/organizations/linuxserver-ci/packages -H "Authorization: Bearer ${SCARF_TOKEN}" -H "Content-Type: application/json" \
29-
-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 }}"}'
26+
curl -vX POST https://scarf.sh/api/v1/organizations/linuxserver-ci/packages -H "Authorization: Bearer ${{ secrets.SCARF_TOKEN }}" -H "Content-Type: application/json" \
27+
-d '{"name":"${{ github.event.inputs.repo_owner }}/${{ github.event.inputs.app_name }}","shortDescription":"example description","libraryType":"docker","website":"https://github.com/${{ github.event.inputs.repo_owner }}/docker-${{ github.event.inputs.app_name }}","backendUrl":"https://ghcr.io/${{ github.event.inputs.repo_owner }}/${{ github.event.inputs.app_name }}","publicUrl":"https://lscr.io/${{ github.event.inputs.repo_owner }}/${{ github.event.inputs.app_name }}"}'
3028
else
3129
echo "Package already exists on Scarf.sh"
3230
fi

0 commit comments

Comments
 (0)