From adae7e6767e4fc18ac902ee5ce2223c3abe5487d Mon Sep 17 00:00:00 2001 From: typescreep Date: Sat, 27 Sep 2025 16:03:31 +0300 Subject: [PATCH] new gh wf --- .github/workflows/docker-build.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index e81772f..47f639b 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -30,6 +30,10 @@ jobs: username: ${{ secrets.CUSTOM_DOCKERHUB_USERNAME }} password: ${{ secrets.CUSTOM_DOCKERHUB_TOKEN }} + - name: Sanitize branch name + id: sanitize + run: echo "branch=$(echo '${{ github.head_ref || github.ref_name }}' | tr '/' '-')" >> $GITHUB_OUTPUT + - name: Build and push Docker image uses: docker/build-push-action@v4 with: @@ -37,6 +41,6 @@ jobs: file: ./Dockerfile.build builder: default push: ${{ github.event_name != 'pull_request' }} - tags: ${{ secrets.CUSTOM_DOCKERHUB_USERNAME }}/openapi-ui:${{ (github.head_ref || github.ref_name) | gsub('/','-') }}-${{ steps.short-sha.outputs.sha }} + tags: ${{ secrets.CUSTOM_DOCKERHUB_USERNAME }}/openapi-ui:${{ steps.sanitize.outputs.branch }}-${{ steps.short-sha.outputs.sha }} build-args: | NODE_VERSION=${{ env.NODE_VERSION }}