Modify Actions to use fmtr.link API

This commit is contained in:
Edward Brown 2024-03-07 16:48:50 +00:00
parent be9395a5b7
commit 46d4c56889

View file

@ -18,7 +18,7 @@ jobs:
NAME_SHORT: ${{ github.event.repository.name }}
ORG: ${{ github.repository_owner }}
REBRANDLY_API_KEY: ${{ secrets.REBRANDLY_API_KEY }}
LINK_ID: ca4942821f5740fbaa46d1066b5cd7e4
LINK_ID: haco/tapp
steps:
- uses: actions/checkout@v3
@ -78,8 +78,8 @@ jobs:
- name: Update Link
run: |
URL=https://github.com/${ORG}/${NAME}/releases/download/v${VERSION}/${NAME_SHORT}.tapp
DATA="{\"destination\": \"${URL}\"}"
curl --request POST --url https://api.rebrandly.com/v1/links/${LINK_ID} --header 'accept: application/json' --header "apikey: ${REBRANDLY_API_KEY}" --header 'content-type: application/json' --data "$DATA" &> /dev/null
DATA="{\"longUrl\": \"${URL}\"}"
curl --request PATCH --url https://fmtr.link/rest/v3/short-urls/${LINK_ID} --header "Content-Type: application/json" --header "X-Api-Key: ${SHLINK_API_KEY}" --data "$DATA" &> /dev/null
- name: Build Docker
run: |