From c2cf74db3f683a4b37b96d1129cf2111720203e1 Mon Sep 17 00:00:00 2001 From: danilapog Date: Wed, 3 Aug 2022 15:08:33 +0300 Subject: [PATCH] Add build nonexample after stable build success --- .github/workflows/stable-build.yml | 48 ++++++++++++++++++++++++++++-- 1 file changed, 46 insertions(+), 2 deletions(-) diff --git a/.github/workflows/stable-build.yml b/.github/workflows/stable-build.yml index 7fd434a..a9f43de 100644 --- a/.github/workflows/stable-build.yml +++ b/.github/workflows/stable-build.yml @@ -12,7 +12,7 @@ env: jobs: build: - name: Build + name: "Release image: DocumentServer${{ matrix.edition }}" runs-on: ubuntu-latest continue-on-error: ${{ matrix.condition }} strategy: @@ -31,7 +31,7 @@ jobs: uses: docker/setup-buildx-action@v2 - name: Login to Docker Hub - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: username: ${{ secrets.DOCKER_HUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} @@ -65,3 +65,47 @@ jobs: exit 1 fi shell: bash + + build-nonExample: + name: "Release image: DocumentServer${{ matrix.edition }}-nonExample" + runs-on: ubuntu-latest + needs: [build] + continue-on-error: ${{ matrix.condition }} + strategy: + matrix: + images: ["documentserver-nonexample"] + edition: ["", "-ee", "-de"] + condition: [true] + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Login to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_HUB_USERNAME }} + password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} + + - name: Get Tag Name + id: tag_name + run: | + echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/} + + - name: build image + run: | + TAG=$(echo ${{ steps.tag_name.outputs.SOURCE_TAG }} | sed 's/^.//; s/-stable//') + PRODUCT_EDITION=${{ matrix.edition }} \ + PRODUCT_NAME=${{ env.PRODUCT_NAME }} \ + COMPANY_NAME=${{ env.COMPANY_NAME }} \ + PREFIX_NAME=-non.example \ + TAG=$TAG \ + docker buildx bake \ + -f docker-bake.hcl ${{ matrix.images }} \ + --push + shell: bash