mirror of
https://github.com/lemeow125/Notes.git
synced 2025-04-04 17:11:34 +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:
|
||||
- name: build
|
||||
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:
|
||||
FORGEJO_REGISTRY_URL:
|
||||
from_secret: FORGEJO_REGISTRY_URL
|
||||
|
@ -22,3 +13,38 @@ steps:
|
|||
from_secret: FORGEJO_REGISTRY_PASSWORD
|
||||
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:
|
||||
- name: deploy
|
||||
image: node:18-alpine
|
||||
when:
|
||||
- branch: master
|
||||
event: push
|
||||
environment:
|
||||
CLOUDFLARE_ACCOUNT_ID:
|
||||
from_secret: CLOUDFLARE_ACCOUNT_ID
|
||||
|
@ -13,3 +10,32 @@ steps:
|
|||
- npm install --save-dev
|
||||
- npm run build
|
||||
- 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