mirror of
https://github.com/lemeow125/Notes.git
synced 2025-04-10 20:11:28 +08:00
Update .yml files
This commit is contained in:
parent
ada7309184
commit
d841f3f3d4
2 changed files with 64 additions and 12 deletions
|
@ -4,15 +4,6 @@ labels:
|
||||||
steps:
|
steps:
|
||||||
- name: build
|
- name: build
|
||||||
image: docker
|
image: docker
|
||||||
when:
|
|
||||||
- branch: master
|
|
||||||
event: push
|
|
||||||
commands:
|
|
||||||
- docker build -t "$REGISTRY_IMAGE_TAG" .
|
|
||||||
- echo "$FORGEJO_REGISTRY_PASSWORD" | docker login "$FORGEJO_REGISTRY_URL" --password-stdin -u "$FORGEJO_REGISTRY_USERNAME"
|
|
||||||
- docker push "$REGISTRY_IMAGE_TAG"
|
|
||||||
volumes:
|
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
|
||||||
environment:
|
environment:
|
||||||
FORGEJO_REGISTRY_URL:
|
FORGEJO_REGISTRY_URL:
|
||||||
from_secret: FORGEJO_REGISTRY_URL
|
from_secret: FORGEJO_REGISTRY_URL
|
||||||
|
@ -22,3 +13,38 @@ steps:
|
||||||
from_secret: FORGEJO_REGISTRY_PASSWORD
|
from_secret: FORGEJO_REGISTRY_PASSWORD
|
||||||
REGISTRY_IMAGE_TAG:
|
REGISTRY_IMAGE_TAG:
|
||||||
from_secret: REGISTRY_IMAGE_TAG
|
from_secret: REGISTRY_IMAGE_TAG
|
||||||
|
commands:
|
||||||
|
- docker build -t "$REGISTRY_IMAGE_TAG" .
|
||||||
|
- echo "$FORGEJO_REGISTRY_PASSWORD" | docker login "$FORGEJO_REGISTRY_URL" --password-stdin -u "$FORGEJO_REGISTRY_USERNAME"
|
||||||
|
- docker push "$REGISTRY_IMAGE_TAG"
|
||||||
|
volumes:
|
||||||
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
|
when:
|
||||||
|
- branch: master
|
||||||
|
event: push
|
||||||
|
- name: mail_success
|
||||||
|
image: deblan/woodpecker-email"
|
||||||
|
settings:
|
||||||
|
dsn:
|
||||||
|
- from_secret: SMTP_SELFHOSTED_DSN
|
||||||
|
from:
|
||||||
|
address:
|
||||||
|
- from_secret: SMTP_SELFHOSTED_FROM_EMAIL
|
||||||
|
name:
|
||||||
|
- from_secret: SMTP_EMAIL_NAME
|
||||||
|
evaluate: 'commit.branch == "master"'
|
||||||
|
recipients:
|
||||||
|
- from_secret: SMTP_SELFHOSTED_EMAIL_TO_1
|
||||||
|
level: success
|
||||||
|
recipients_only: false
|
||||||
|
content:
|
||||||
|
subject: "[{{ pipeline.status }}] {{ repo.full_name }} ({{ commit.branch }} - {{ commit.sha[0:8] }}"
|
||||||
|
body: |
|
||||||
|
{{ commit.sha }}<br>
|
||||||
|
{{ pipeline.status }}<br>
|
||||||
|
{{ commit.author_email }}<br>
|
||||||
|
attachments:
|
||||||
|
- log/*
|
||||||
|
when:
|
||||||
|
status:
|
||||||
|
- success
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
steps:
|
steps:
|
||||||
- name: deploy
|
- name: deploy
|
||||||
image: node:18-alpine
|
image: node:18-alpine
|
||||||
when:
|
|
||||||
- branch: master
|
|
||||||
event: push
|
|
||||||
environment:
|
environment:
|
||||||
CLOUDFLARE_ACCOUNT_ID:
|
CLOUDFLARE_ACCOUNT_ID:
|
||||||
from_secret: CLOUDFLARE_ACCOUNT_ID
|
from_secret: CLOUDFLARE_ACCOUNT_ID
|
||||||
|
@ -13,3 +10,32 @@ steps:
|
||||||
- npm install --save-dev
|
- npm install --save-dev
|
||||||
- npm run build
|
- npm run build
|
||||||
- npx wrangler pages deploy "./build/" --project-name blog --branch master --commit-dirty
|
- npx wrangler pages deploy "./build/" --project-name blog --branch master --commit-dirty
|
||||||
|
when:
|
||||||
|
- branch: master
|
||||||
|
event: push
|
||||||
|
- name: mail_success
|
||||||
|
image: deblan/woodpecker-email"
|
||||||
|
settings:
|
||||||
|
dsn:
|
||||||
|
- from_secret: SMTP_SELFHOSTED_DSN
|
||||||
|
from:
|
||||||
|
address:
|
||||||
|
- from_secret: SMTP_SELFHOSTED_FROM_EMAIL
|
||||||
|
name:
|
||||||
|
- from_secret: SMTP_EMAIL_NAME
|
||||||
|
evaluate: 'commit.branch == "master"'
|
||||||
|
recipients:
|
||||||
|
- from_secret: SMTP_SELFHOSTED_EMAIL_TO_1
|
||||||
|
level: success
|
||||||
|
recipients_only: false
|
||||||
|
content:
|
||||||
|
subject: "[{{ pipeline.status }}] {{ repo.full_name }} ({{ commit.branch }} - {{ commit.sha[0:8] }}"
|
||||||
|
body: |
|
||||||
|
{{ commit.sha }}<br>
|
||||||
|
{{ pipeline.status }}<br>
|
||||||
|
{{ commit.author_email }}<br>
|
||||||
|
attachments:
|
||||||
|
- log/*
|
||||||
|
when:
|
||||||
|
status:
|
||||||
|
- success
|
||||||
|
|
Loading…
Add table
Reference in a new issue