up3
Build and deploy / Build (push) Has been cancelled
Build and deploy / Update Contributors (push) Has been cancelled
Build and deploy / Deploy (push) Has been cancelled
Build and deploy / Build (push) Has been cancelled
Build and deploy / Update Contributors (push) Has been cancelled
Build and deploy / Deploy (push) Has been cancelled
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
name: Deploy
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [opened, synchronize, reopened, closed]
|
||||
jobs:
|
||||
|
||||
deploy:
|
||||
name: Deploy
|
||||
if: github.event.action != 'closed'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
ref: refs/pull/${{ github.event.pull_request.number }}/merge
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v6
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
|
||||
- name: Build
|
||||
run: go build -o dragonfly_exe -v .
|
||||
|
||||
- name: Deploy test server
|
||||
run: |
|
||||
curl -X POST https://df-mc.dev/pullrequest \
|
||||
-H "X-API-Key: ${{ secrets.API_KEY }}" \
|
||||
-F "pr=${{ github.event.pull_request.number }}" \
|
||||
-F "binary=@dragonfly_exe"
|
||||
|
||||
cleanup:
|
||||
name: Cleanup
|
||||
if: github.event.action == 'closed'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Delete test server
|
||||
run: |
|
||||
curl -X DELETE https://df-mc.dev/pullrequest/${{ github.event.pull_request.number }} \
|
||||
-H "X-API-Key: ${{ secrets.API_KEY }}"
|
||||
Reference in New Issue
Block a user