Add woodpecker CI integration
This commit is contained in:
parent
47bc988b39
commit
9807f3d54d
79
.woodpecker.yaml
Normal file
79
.woodpecker.yaml
Normal file
@ -0,0 +1,79 @@
|
||||
steps:
|
||||
- name: build-release
|
||||
image: alpine
|
||||
secrets: [GITEA_TOKEN]
|
||||
when:
|
||||
- event: push
|
||||
- branch: main
|
||||
commands:
|
||||
- apk add openjdk21
|
||||
- apk add wget
|
||||
- apk add tar
|
||||
- wget -O teacli https://dl.gitea.com/tea/main/tea-main-linux-amd64
|
||||
- chmod +x teacli
|
||||
- wget https://github.com/demonnic/muddler/releases/download/0.13/muddle-shadow-0.13.tar
|
||||
- tar -xvf muddle-shadow-0.13.tar
|
||||
- mv muddle-shadow-0.13/lib/muddle-0.13-all.jar muddle.jar
|
||||
|
||||
- name: deploy-build
|
||||
image: woodpeckerci/plugin-gitea-release
|
||||
when:
|
||||
- event: push
|
||||
- branch: main
|
||||
settings:
|
||||
base_url: https://git.vertinext.com
|
||||
files:
|
||||
- "build/lotj-ui.mpackage"
|
||||
- "build/lotj-ui.xml"
|
||||
api_key:
|
||||
from_secret: GITEA_TOKEN
|
||||
target: main
|
||||
depends_on: build-release
|
||||
|
||||
- name: test-build
|
||||
image: alpine
|
||||
when:
|
||||
- event: pull_request
|
||||
- event: push
|
||||
- branch:
|
||||
include: **
|
||||
exclude: main
|
||||
commands:
|
||||
- apk add openjdk21
|
||||
- apk add wget
|
||||
- apk add tar
|
||||
- wget https://github.com/demonnic/muddler/releases/download/0.13/muddle-shadow-0.13.tar
|
||||
- tar -xvf muddle-shadow-0.13.tar
|
||||
- mv muddle-shadow-0.13/lib/muddle-0.13-all.jar muddle.jar
|
||||
- java -jar muddle.jar
|
||||
|
||||
- name: notify-on-pull
|
||||
image: mcs94/gitea-comment
|
||||
settings:
|
||||
gitea_address: https://git.vertinext.com
|
||||
gitea_token:
|
||||
from_secret: GITEA_TOKEN
|
||||
comment: >
|
||||
✅ Build ${CI_BUILD_EVENT} of `${CI_REPO_NAME}` has status `${CI_BUILD_STATUS}`.
|
||||
📝 Commit by ${CI_COMMIT_AUTHOR} on `${CI_COMMIT_BRANCH}`:
|
||||
`${CI_COMMIT_MESSAGE}`
|
||||
🌐 ${CI_BUILD_LINK}
|
||||
depends_on: test-build
|
||||
when:
|
||||
- event: pull_request
|
||||
- branch: main
|
||||
- status: [success, failure]
|
||||
|
||||
- name: notify-on-branch-push
|
||||
image: alpine
|
||||
when:
|
||||
- event: push
|
||||
- status: [success, failure]
|
||||
- branch:
|
||||
include: **
|
||||
exclude: main
|
||||
depends_on: test-build
|
||||
secrets: [GITEA_TOKEN]
|
||||
commands:
|
||||
- apk add curl
|
||||
- curl "https://git.vertinext.com/message?token=${GITEA_TOKEN}" -F "title=${CI} - ${CI_REPO_NAME}" -F "message=${CI_BUILD_EVENT} has status ${CI_BUILD_STATUS}" -F "priority=0"
|
Loading…
Reference in New Issue
Block a user