fix(ci): use user_input as simple string

json need special escaping, and its actually a single input for now
This commit is contained in:
youben11
2023-04-05 12:03:03 +01:00
committed by Ayoub Benaissa
parent e50013b75c
commit c68eed79f9
3 changed files with 15 additions and 4 deletions

View File

@@ -18,6 +18,7 @@ on:
description: 'Slab request ID'
type: string
user_inputs:
description: 'either "nightly" or "public" to specify the release type'
required: true
type: string
@@ -50,7 +51,7 @@ jobs:
- name: Set up GitHub environment
run: |
echo "RELEASE_TYPE=${{ fromJSON(inputs.user_inputs).release_type }}" >> "${GITHUB_ENV}"
echo "RELEASE_TYPE=${{ inputs.user_inputs }}" >> "${GITHUB_ENV}"
echo "HOME=/home/ubuntu" >> "${GITHUB_ENV}"
#echo "SSH_AUTH_SOCK=$SSH_AUTH_SOCK)" >> "${GITHUB_ENV}"
echo "SSH_AUTH_SOCK_DIR=$(dirname $SSH_AUTH_SOCK)" >> "${GITHUB_ENV}"
@@ -175,9 +176,18 @@ jobs:
toolchain: nightly
override: true
- name: Set release version
- name: Set up GitHub environment
run: |
echo "RELEASE_TYPE=${{ inputs.user_inputs }}" >> "${GITHUB_ENV}"
- name: Set release version (nightly)
if: ${{ env.RELEASE_TYPE == "nightly" }}
run: echo "__version__ = \"$(date +"%Y.%m.%d")\"" >| frontends/concrete-python/version.txt
- name: Set release version (public)
if: ${{ env.RELEASE_TYPE == "public" }}
run: echo "__version__ = \"`git describe --tags --abbrev=0 | grep -e '[0-9].*' -o`\"" >| frontends/concrete-python/version.txt
- name: Create build directory
run: mkdir build

View File

@@ -261,7 +261,7 @@ jobs:
secrets: inherit
with:
command: concrete-python-release
user_inputs: '{"release_type": "nightly"}'
user_inputs: 'nightly'
concrete-python-public-release:
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
@@ -269,4 +269,4 @@ jobs:
secrets: inherit
with:
command: concrete-python-release
user_inputs: '{"release_type": "public"}'
user_inputs: 'public'

View File

@@ -16,6 +16,7 @@ on:
required: true
type: string
user_inputs:
description: 'user inputs to be forwarded to the called workflow'
required: false
type: string