-
-
Notifications
You must be signed in to change notification settings - Fork 33
29 lines (24 loc) 路 875 Bytes
/
Copy pathcreate.yml
File metadata and controls
29 lines (24 loc) 路 875 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
name: 1. 馃彈 Create cloud app
on:
workflow_dispatch:
jobs:
create:
name: 馃洬 Create the app and volume entries
runs-on: ubuntu-latest
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
steps:
- 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: 馃П Create fly.io app
run: flyctl apps create ${{ env.APP_NAME }} --org personal
- name: 馃捊 Create fly.io volume
run: flyctl volumes create gsw_data --size 1 --region ${{ secrets.FLY_REGION }} --app ${{ env.APP_NAME }} --yes