Files
ATM8/.drone.yml
Adrian Marquis c315d2ef0b
Some checks failed
continuous-integration/drone/push Build is failing
Added git author to push
2023-05-29 15:43:41 +02:00

180 lines
4.0 KiB
YAML

---
kind: "pipeline"
type: "docker"
name: "Create Release from tag"
trigger:
event:
- "tag"
volumes:
- name: "tmp"
temp: {}
- name: "server"
temp: {}
- name: "client"
temp: {}
- name: "curse"
temp: {}
steps:
- name: "Run build tool"
image: "gitea.marquis.site/operations/modpack_buildah"
settings:
modpack__version: "${DRONE_TAG}"
curseforge_apikey:
from_secret: "curseforge_apikey"
volumes:
- name: "server"
path: "/out/server"
- name: "client"
path: "/out/client"
- name: "curse"
path: "/out/curse"
- name: "tmp"
path: "/tmp/modpack_buildah"
- name: "Build and push server container image"
image: "plugins/docker"
privileged: true
settings:
dockerfile: "/out/server/Dockerfile"
context: "/out/server"
registry: "gitea.marquis.site"
repo: "gitea.marquis.site/minecraft/atm8"
username: "drone-ci"
password:
from_secret: "gitea_registry_password"
tags:
- "${DRONE_COMMIT_SHA:0:8}"
- "latest"
- "${DRONE_TAG}"
volumes:
- name: "server"
path: "/out/server"
- name: "Update client files in repository"
image: "alpine/git"
commands:
- "git fetch origin +refs/heads/master"
- "git checkout master"
- "cp -r /out/client/* ."
volumes:
- name: "client"
path: "/out/client"
- name: "Push new client version to repository"
image: "appleboy/drone-git-push"
settings:
branch: "master"
remote_name: "origin"
commit: true
author_name: "${DRONE_COMMIT_AUTHOR_NAME}"
commit_message: "Version ${DRONE_TAG}"
- name: "Create Gitea Release for curse modpack"
image: "plugins/gitea-release"
settings:
api_key:
from_secret: "gitea_registry_password"
base_url: "gitea.marquis.site"
files: "/out/curse/*-${DRONE_TAG}.zip"
title: "Version ${DRONE_TAG}"
volumes:
- name: "curse"
path: "/out/curse"
---
kind: "pipeline"
type: "docker"
name: "[Debug] Static Release on Push"
trigger:
branch: "config"
event:
- "push"
volumes:
- name: "tmp"
temp: {}
- name: "server"
temp: {}
- name: "client"
temp: {}
- name: "curse"
temp: {}
steps:
- name: "Run build tool"
image: "gitea.marquis.site/operations/modpack_buildah"
settings:
# modpack__version: "${DRONE_TAG}"
modpack__version: "1.0.19b"
curseforge_apikey:
from_secret: "curseforge_apikey"
volumes:
- name: "server"
path: "/out/server"
- name: "client"
path: "/out/client"
- name: "curse"
path: "/out/curse"
- name: "tmp"
path: "/tmp/modpack_buildah"
- name: "Build and push server container image"
image: "plugins/docker"
privileged: true
settings:
dockerfile: "/out/server/Dockerfile"
context: "/out/server"
registry: "gitea.marquis.site"
repo: "gitea.marquis.site/minecraft/atm8"
# tags: "${DRONE_TAG}"
tags:
- "latest"
- "${DRONE_COMMIT_SHA:0:8}"
- "1.0.19b"
username: "drone-ci"
password:
from_secret: "gitea_registry_password"
volumes:
- name: "server"
path: "/out/server"
- name: "Update client files in repository"
image: "alpine/git"
commands:
- "git branch -v"
- "git fetch origin +refs/heads/master"
- "git checkout master"
- "cp -r /out/client/* ."
volumes:
- name: "client"
path: "/out/client"
- name: "Push new client version to repository"
image: "appleboy/drone-git-push"
settings:
branch: "master"
remote_name: "origin"
author_name: "${DRONE_COMMIT_AUTHOR_NAME}"
commit: true
# commit_message: "Version ${DRONE_TAG}"
commit_message: "Version 1.0.19b"
- name: "Create Gitea Release for curse modpack"
image: "plugins/gitea-release"
settings:
api_key:
from_secret: "gitea_registry_password"
base_url: "gitea.marquis.site"
# files: "/out/curse/*-${DRONE_TAG}.zip"
# title: "Version ${DRONE_TAG}"
files: "/out/curse/*-1.0.19b.zip"
title: "Version 1.0.19b"
volumes:
- name: "curse"
path: "/out/curse"