mirror of
https://github.com/multipleof4/git.planetrenox.com.git
synced 2026-01-14 00:17:57 +00:00
Create runner-deploy.yml
This commit is contained in:
30
.github/workflows/runner-deploy.yml
vendored
Normal file
30
.github/workflows/runner-deploy.yml
vendored
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
name: Deploy Gitea Runner
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy-runner:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v5
|
||||||
|
- uses: superfly/flyctl-actions/setup-flyctl@master
|
||||||
|
|
||||||
|
- name: Create runner app and volume if not exists
|
||||||
|
run: |
|
||||||
|
flyctl apps create ${{ secrets.RUNNER_APP_NAME }} || echo "Runner app exists"
|
||||||
|
flyctl volumes create runner_data --size 1 -a ${{ secrets.RUNNER_APP_NAME }} || echo "Runner volume exists"
|
||||||
|
env:
|
||||||
|
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
|
||||||
|
|
||||||
|
- name: Register runner token
|
||||||
|
run: |
|
||||||
|
flyctl secrets set \
|
||||||
|
GITEA_RUNNER_REGISTRATION_TOKEN=${{ secrets.GITEA_RUNNER_REGISTRATION_TOKEN }} \
|
||||||
|
-a ${{ secrets.RUNNER_APP_NAME }}
|
||||||
|
env:
|
||||||
|
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
|
||||||
|
|
||||||
|
- name: Deploy runner
|
||||||
|
run: flyctl deploy --remote-only -a ${{ secrets.RUNNER_APP_NAME }} --config runner/fly.toml
|
||||||
|
env:
|
||||||
|
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
|
||||||
Reference in New Issue
Block a user