add build file.
Some checks failed
Deploy Docker Images / Docusaurus build and Server deploy (push) Failing after 5s
Some checks failed
Deploy Docker Images / Docusaurus build and Server deploy (push) Failing after 5s
This commit is contained in:
parent
befed2dbe6
commit
e2b777404d
|
@ -17,4 +17,15 @@ jobs:
|
|||
run: |
|
||||
for file in ${{ steps.changed-dockerfiles.outputs.all_changed_files }}; do
|
||||
echo "${file} changed."
|
||||
resources/build.sh build ${file}
|
||||
done
|
||||
- name: Notify-End
|
||||
if: ${{ always() }}
|
||||
run: |
|
||||
echo "${{ github.repository }} 构建结束" > notify.tpl
|
||||
echo "构建状态: ${{ job.status }}">> notify.tpl
|
||||
echo "构建地址: https://gitea.amass.fun/${{ github.repository }}/actions/runs/${{ github.run_number }}">> notify.tpl
|
||||
echo "仓库地址: https://gitea.amass.fun/${{ github.repository }}">> notify.tpl
|
||||
echo "提交ID: $(git rev-parse --short HEAD)">> notify.tpl
|
||||
echo -n "提交消息: ${{ github.event.head_commit.message }}">> notify.tpl
|
||||
cat notify.tpl | envsubst | jq -sR . | xargs -0 -I {} curl -H "Content-Type: application/json" -X POST -d '{"type":"text","msg":{} }' https://amass.fun/notify
|
||||
|
|
28
resources/build.sh
Normal file
28
resources/build.sh
Normal file
|
@ -0,0 +1,28 @@
|
|||
#!/bin/bash
|
||||
|
||||
function build() {
|
||||
local DOCKERFILE=$1
|
||||
echo "build $DOCKERFILE"
|
||||
}
|
||||
|
||||
function deploy(){
|
||||
|
||||
}
|
||||
|
||||
function main() {
|
||||
local cmd=$1
|
||||
shift 1
|
||||
case $cmd in
|
||||
deploy)
|
||||
deploy $@
|
||||
;;
|
||||
build)
|
||||
build $@
|
||||
;;
|
||||
*)
|
||||
build $@
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
main $@
|
|
@ -1,6 +0,0 @@
|
|||
repo: $DRONE_REPO_NAME
|
||||
status: $DRONE_BUILD_STATUS
|
||||
commit: $DRONE_COMMIT
|
||||
构建: $DRONE_BUILD_LINK
|
||||
仓库: $DRONE_REPO_LINK
|
||||
提交注释: $DRONE_COMMIT_MESSAGE
|
|
@ -1,12 +1,12 @@
|
|||
FROM ubuntu:22.04
|
||||
LABEL maintainer 168062547@qq.com
|
||||
LABEL maintainer="amass <168062547@qq.com>"
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN sed -i "s@http://.*archive.ubuntu.com@http://mirrors.tuna.tsinghua.edu.cn@g" /etc/apt/sources.list \
|
||||
&& sed -i "s@http://.*security.ubuntu.com@http://mirrors.tuna.tsinghua.edu.cn@g" /etc/apt/sources.list \
|
||||
&& apt update \
|
||||
&& apt install -y gcc g++ cmake ninja-build pkg-config openssh-server git nano gpg ca-certificates \
|
||||
wget curl rsync lsb-release ubuntu-keyring gnupg2 libssl-dev \
|
||||
wget curl rsync lsb-release ubuntu-keyring gnupg2 libssl-dev gettext jq \
|
||||
&& install -m 0755 -d /etc/apt/keyrings \
|
||||
&& curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc \
|
||||
&& chmod a+r /etc/apt/keyrings/docker.asc \
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
FROM ubuntu:24.04
|
||||
|
||||
LABEL maintainer="amass <168062547@qq.com>"
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN sed -i 's@//.*archive.ubuntu.com@//mirrors.ustc.edu.cn@g' /etc/apt/sources.list.d/ubuntu.sources \
|
||||
|
|
Loading…
Reference in New Issue
Block a user