Skip to content

Commit

Permalink
Migrate links to fmtr.link and move actions email to secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
ejohb committed Mar 27, 2024
1 parent e710f75 commit 302956b
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ jobs:
NAME: ${{ github.event.repository.name }}
NAME_SHORT: tools
ORG: ${{ github.repository_owner }}
REBRANDLY_API_KEY: ${{ secrets.REBRANDLY_API_KEY }}
LINK_ID: c1a97c998c4741168e97a2fa31384551
SHLINK_API_KEY: ${{ secrets.SHLINK_API_KEY }}
LINK_ID: be/tools/tapp

steps:
- uses: actions/checkout@v3
Expand All @@ -30,9 +30,11 @@ jobs:
pip install tappack
- name: Increment Version
env:
GIT_EMAIL: ${{ secrets.GIT_EMAIL }}
run: |
git config --global user.name 'Frontmatter Actions'
git config --global user.email '[email protected]'
git config --global user.email "$GIT_EMAIL"
echo -n ${VERSION} > version
python3 update_version.py ${VERSION}
Expand Down Expand Up @@ -63,5 +65,5 @@ 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

0 comments on commit 302956b

Please sign in to comment.