Build with anchors

This commit is contained in:
Nikolai Rodionov 2023-12-08 18:49:20 +01:00
parent 59dca13656
commit 86140ea516
No known key found for this signature in database
GPG Key ID: D430FEC9A116EE7A
2 changed files with 12 additions and 9 deletions

View File

@ -28,6 +28,9 @@ name: Build badhouseplants.net
trigger: trigger:
event: event:
- push - push
builder: &builder
image: git.badhouseplants.net/badhouseplants/badhouseplants-builder:555262114ea81f6f286010474527f419b56d33a3
clone: clone:
disable: true disable: true
steps: steps:
@ -45,8 +48,8 @@ steps:
- clone - clone
commands: commands:
- hugo -s ./src - hugo -s ./src
- name: Build and push the docker image - <<: *builder
image: git.badhouseplants.net/badhouseplants/badhouseplants-builder:2449b73b13a62ae916c6703778d096e5290157b3 name: Build and push the docker image
privileged: true privileged: true
depends_on: depends_on:
- Test a build - Test a build
@ -56,8 +59,8 @@ steps:
from_secret: GITEA_TOKEN from_secret: GITEA_TOKEN
commands: commands:
- ./scripts/build-container.pl - ./scripts/build-container.pl
- name: Sync pictures from lfs to Minio - <<: *builder
image: git.badhouseplants.net/badhouseplants/badhouseplants-builder:2449b73b13a62ae916c6703778d096e5290157b3 name: Sync pictures from lfs to Minio
depends_on: depends_on:
- Test a build - Test a build
environment: environment:
@ -67,8 +70,8 @@ steps:
commands: commands:
- echo "$RCLONE_CONFIG_CONTENT" > $RCLONE_CONFIG - echo "$RCLONE_CONFIG_CONTENT" > $RCLONE_CONFIG
- ./scripts/upload-media.pl - ./scripts/upload-media.pl
- name: Deploy the application - <<: *builder
image: git.badhouseplants.net/badhouseplants/badhouseplants-builder:2449b73b13a62ae916c6703778d096e5290157b3 name: Deploy the application
depends_on: depends_on:
- Build and push the docker image - Build and push the docker image
- Sync pictures from lfs to Minio - Sync pictures from lfs to Minio
@ -84,8 +87,8 @@ steps:
DEPLOY_SCRIPT_DEBUG: true DEPLOY_SCRIPT_DEBUG: true
commands: commands:
- ./scripts/deploy-app.pl - ./scripts/deploy-app.pl
- name: Cleanup everything - <<: *builder
image: git.badhouseplants.net/badhouseplants/badhouseplants-builder:2449b73b13a62ae916c6703778d096e5290157b3 name: Cleanup everything
depends_on: depends_on:
- Deploy the application - Deploy the application
environment: environment:

View File

@ -1,4 +1,4 @@
FROM git.badhouseplants.net/badhouseplants/hugo-container:df0ab0c6f98e1921f451eb444aa5e7cb03d1f27b FROM git.badhouseplants.net/badhouseplants/hugo-container:3daaf01c9811501f2b4c691f6910e3df285c2007
WORKDIR /src WORKDIR /src
COPY ./src /src COPY ./src /src
ENTRYPOINT ["hugo"] ENTRYPOINT ["hugo"]