mirror of
https://github.com/multipleof4/git.planetrenox.com.git
synced 2026-01-13 16:07:55 +00:00
21 lines
1.2 KiB
YAML
21 lines
1.2 KiB
YAML
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
app:
|
|
description: 'App to deploy'
|
|
required: true
|
|
type: choice
|
|
options: [gitea, runner]
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: superfly/flyctl-actions/setup-flyctl@master
|
|
- if: github.event.inputs.app == 'gitea'
|
|
run: flyctl apps create ${{ secrets.FLY_APP_NAME }} || true; flyctl volumes create gitea_data --size 1 -a ${{ secrets.FLY_APP_NAME }} || true; flyctl deploy --remote-only -a ${{ secrets.FLY_APP_NAME }} -c fly.toml --build-arg GITEA_APP_NAME=${{ secrets.FLY_APP_NAME }}
|
|
- if: github.event.inputs.app == 'runner'
|
|
run: flyctl apps create ${{ secrets.RUNNER_APP_NAME }} || true; flyctl volumes create runner_data --size 1 -a ${{ secrets.RUNNER_APP_NAME }} || true; flyctl secrets set GITEA_RUNNER_REGISTRATION_TOKEN='${{ secrets.GITEA_RUNNER_REGISTRATION_TOKEN }}' -a ${{ secrets.RUNNER_APP_NAME }}; flyctl deploy --remote-only -a ${{ secrets.RUNNER_APP_NAME }} -c runner/fly.toml --build-arg GITEA_INSTANCE_URL=https://${{ secrets.FLY_APP_NAME }}.fly.dev
|