From 5d090a6f465b510cb3863ac09e9aa0139d4804a2 Mon Sep 17 00:00:00 2001 From: Aina Sitraka <35221835+aynsix@users.noreply.github.com> Date: Wed, 13 Nov 2024 18:47:43 +0300 Subject: [PATCH] PS-688 copy git log into dashboard image (#475) --- .github/workflows/build.yaml | 8 +++++++- .github/workflows/ci.yaml | 2 +- bin/build.sh | 2 ++ bin/git-log.sh | 5 +++++ dashboard/client/.gitignore | 1 + dashboard/client/Dockerfile | 1 + 6 files changed, 17 insertions(+), 2 deletions(-) create mode 100755 bin/git-log.sh diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 983178bc7..58e9560ba 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -30,7 +30,13 @@ jobs: if: ${{ github.repository_owner == 'alchemy-fr' }} steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 + with: + fetch-depth: 30 + + - name: Generate git log + if: "${{ inputs.image == 'dashboard' }}" + run: bin/git-log.sh - uses: docker/setup-qemu-action@v2 - uses: docker/setup-buildx-action@v2 diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e3e95ab8e..e57a97647 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -223,7 +223,7 @@ jobs: mkcert -install - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Log in to the Container registry uses: docker/login-action@v2 diff --git a/bin/build.sh b/bin/build.sh index 89d452799..7999015c6 100755 --- a/bin/build.sh +++ b/bin/build.sh @@ -6,5 +6,7 @@ set -e load-env +bin/git-log.sh + docker compose -f docker-compose.init.yml build $@ docker compose build $@ diff --git a/bin/git-log.sh b/bin/git-log.sh new file mode 100755 index 000000000..dc7fc7301 --- /dev/null +++ b/bin/git-log.sh @@ -0,0 +1,5 @@ +#!/bin/bash + + +git --no-pager log --graph --pretty=format:" %h %s %cn %ad
" -n30 >> ./dashboard/client/git-log.html + diff --git a/dashboard/client/.gitignore b/dashboard/client/.gitignore index 04946d4a5..f9ec8ce85 100644 --- a/dashboard/client/.gitignore +++ b/dashboard/client/.gitignore @@ -27,6 +27,7 @@ logs *.log pnpm-debug.log* lerna-debug.log* +git-log.html node_modules dist diff --git a/dashboard/client/Dockerfile b/dashboard/client/Dockerfile index 17e4d2b9a..f69078a32 100644 --- a/dashboard/client/Dockerfile +++ b/dashboard/client/Dockerfile @@ -37,6 +37,7 @@ ARG SENTRY_RELEASE ENV SENTRY_RELEASE=${SENTRY_RELEASE} COPY ./dashboard/client/config-compiler.js /var/app/ +COPY ./dashboard/client/git-log.html /var/app/ WORKDIR /var/app