fix: fly.io github actions support for non lowercase owner names

* fly.io app name rules: Name may only contain numbers, lowercase letters and dashes
This commit is contained in:
Smith
2023-12-12 17:44:50 +01:00
parent 6e0a8e6633
commit 20169a134d
4 changed files with 36 additions and 6 deletions

View File

@@ -20,5 +20,15 @@ jobs:
fetch-depth: 0
- uses: superfly/flyctl-actions/setup-flyctl@master
- name: Set app name
run: |
if [[ -n "${{ secrets.FLY_APP_NAME }}" ]]; then
echo "APP_NAME=${{ secrets.FLY_APP_NAME }}" >> $GITHUB_ENV
else
echo "APP_NAME=${REPO_OWNER,,}-gsw" >> $GITHUB_ENV
fi
env:
REPO_OWNER: '${{ github.repository_owner }}'
- name: 🛩 Deploy to fly.io
run: flyctl deploy --remote-only --auto-confirm --region ${{ secrets.FLY_REGION }} --app ${{ github.repository_owner }}-gsw
run: flyctl deploy --remote-only --auto-confirm --region ${{ secrets.FLY_REGION }} --app ${{ env.APP_NAME }}