mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-13 01:38:29 +03:00
fix: improve Dockerfiles 2
This commit is contained in:
@@ -36,6 +36,10 @@ jobs:
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1
|
||||
|
||||
- name: Set build time
|
||||
id: build_time
|
||||
run: echo "value=$(date -u +%Y-%m-%dT%H:%M:%SZ)" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355 # v6.10.0
|
||||
with:
|
||||
@@ -48,6 +52,9 @@ jobs:
|
||||
ghcr.io/zkldi/tachi-bot:${{ github.sha }}
|
||||
ghcr.io/zkldi/tachi-bot:main
|
||||
ghcr.io/zkldi/tachi-bot:latest
|
||||
build-args: |
|
||||
COMMIT_HASH=${{ github.sha }}
|
||||
BUILD_TIME=${{ steps.build_time.outputs.value }}
|
||||
cache-from: type=gha,scope=${{ github.ref_name }}-bot
|
||||
cache-to: type=gha,mode=max,scope=${{ github.ref_name }}-bot
|
||||
|
||||
|
||||
@@ -35,6 +35,10 @@ jobs:
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1
|
||||
|
||||
- name: Set build time
|
||||
id: build_time
|
||||
run: echo "value=$(date -u +%Y-%m-%dT%H:%M:%SZ)" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355 # v6.10.0
|
||||
with:
|
||||
@@ -47,6 +51,9 @@ jobs:
|
||||
ghcr.io/zkldi/tachi-ghbot:${{ github.sha }}
|
||||
ghcr.io/zkldi/tachi-ghbot:main
|
||||
ghcr.io/zkldi/tachi-ghbot:latest
|
||||
build-args: |
|
||||
COMMIT_HASH=${{ github.sha }}
|
||||
BUILD_TIME=${{ steps.build_time.outputs.value }}
|
||||
cache-from: type=gha,scope=${{ github.ref_name }}-github-bot
|
||||
cache-to: type=gha,mode=max,scope=${{ github.ref_name }}-github-bot
|
||||
|
||||
|
||||
@@ -126,6 +126,10 @@ jobs:
|
||||
run: |
|
||||
echo "version=$(jq -r .version typescript/server/package.json)" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Set build time
|
||||
id: build_time
|
||||
run: echo "value=$(date -u +%Y-%m-%dT%H:%M:%SZ)" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Build and push unified server image
|
||||
uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355 # v6.10.0
|
||||
with:
|
||||
@@ -142,6 +146,7 @@ jobs:
|
||||
build-args: |
|
||||
VERSION=${{ steps.server_version.outputs.version }}
|
||||
COMMIT_HASH=${{ github.sha }}
|
||||
BUILD_TIME=${{ steps.build_time.outputs.value }}
|
||||
cache-from: type=gha,scope=server-${{ github.ref_name }}
|
||||
cache-to: type=gha,mode=max,scope=server-${{ github.ref_name }}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user