From bfbad99807d86e275ebf57c338b9c33f4208d96e Mon Sep 17 00:00:00 2001 From: Thomas Belin Date: Thu, 28 Sep 2023 14:06:44 +0200 Subject: [PATCH] chore: Create release page when creating release artifact (#15902) --- .github/workflows/create_docker_image.yml | 29 +++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/.github/workflows/create_docker_image.yml b/.github/workflows/create_docker_image.yml index b09466cb797..e9c916a95bd 100644 --- a/.github/workflows/create_docker_image.yml +++ b/.github/workflows/create_docker_image.yml @@ -1,19 +1,25 @@ -name: Create Docker image +name: Create Release Artifact on: workflow_dispatch: inputs: tag: - description: 'tagname for the Docker image' + description: 'tagname for the Artifact' required: true type: string + create_release: + description: 'Wether or not a release entry should be created on github' + required: false + default: true + type: boolean + concurrency: group: ci-${{ github.ref }} cancel-in-progress: true jobs: - test_build_deploy: + create_image: runs-on: ubuntu-latest steps: @@ -32,7 +38,9 @@ jobs: run: yarn --immutable - name: Test - run: yarn test --coverage --coverage-reporters=lcov --detectOpenHandles=false + run: | + set -o pipefail + yarn test --coverage --coverage-reporters=lcov --detectOpenHandles=false 2>&1 | tee ./unit-tests.log - name: Build run: yarn build:prod @@ -42,3 +50,16 @@ jobs: DOCKER_PASSWORD: ${{secrets.WEBTEAM_QUAY_PASSWORD}} DOCKER_USERNAME: ${{secrets.WEBTEAM_QUAY_USERNAME}} run: yarn docker '' "${{inputs.tag}}" + + - name: Create GitHub release + if: ${{inputs.create_release}} + id: create_release_production + uses: softprops/action-gh-release@v1 + env: + GITHUB_TOKEN: ${{github.token}} + with: + tag_name: ${{inputs.tag}} + name: ${{inputs.tag}} + files: ./unit-tests.log + draft: false + prerelease: true