diff --git a/.github/workflows/platformer-04d64a45-af67-40bd-88cb-66ad84e486b7.yml b/.github/workflows/platformer-04d64a45-af67-40bd-88cb-66ad84e486b7.yml new file mode 100644 index 0000000..9647e39 --- /dev/null +++ b/.github/workflows/platformer-04d64a45-af67-40bd-88cb-66ad84e486b7.yml @@ -0,0 +1,36 @@ +name: Platformer Generated stag-api-tag-push Build +'on': + push: + tags: + - stag* +jobs: + build: + runs-on: + - ubuntu-latest + env: + SERVICE_NAME: ghcr.io/eclk/nomination + CONTAINER_REGISTRY: ghcr.io + steps: + - uses: actions/checkout@v2 + - name: Set Version + id: event-version + run: echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/} + - name: Login to GitHub Container Registry + uses: docker/login-action@v1 + with: + registry: ${{ env.CONTAINER_REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.DOCKER_PASSWORD_04D64A45_AF67_40BD_88CB_66AD84E486B7 }} + - name: Build the Docker image + run: docker build --tag ${SERVICE_NAME}:${{steps.event-version.outputs.SOURCE_TAG }} --file ./server/Dockerfile ./server + - name: GitHub Image Push + run: docker push $SERVICE_NAME:${{steps.event-version.outputs.SOURCE_TAG }} + - name: Platformer Deploy + uses: platformer-com/build-deploy-action@v1 + with: + org-id: ${{secrets.ORG_ID_5B1B6B11_FF45_48E4_BA37_2AD509CB21E7}} + project-id: ${{secrets.PROJECT_ID_5B1B6B11_FF45_48E4_BA37_2AD509CB21E7}} + token: ${{secrets.AUTOGENERATED_CICD_5B1B6B11_FF45_48E4_BA37_2AD509CB21E7}} + image-name: ${{env.SERVICE_NAME}} + tag: ${{steps.event-version.outputs.SOURCE_TAG }} + container-id: fc6f2843-4674-43c9-bad1-d6529b81cd66 diff --git a/server/src/routes/schema/nominationSchema.js b/server/src/routes/schema/nominationSchema.js index c1e43b0..5574748 100755 --- a/server/src/routes/schema/nominationSchema.js +++ b/server/src/routes/schema/nominationSchema.js @@ -48,7 +48,7 @@ export let services2 = Joi.array().items(UPDATE_SUPPORT_DOC_SCHEMA) export const SAVE_CANDIDATE_SCHEMA = Joi.object().keys({ candidateData: Joi.array().items(Joi.object({ - candidateConfigID: Joi.number().integer().required(), + candidateConfigID: Joi.number().integer().required(), value: Joi.string().max(300).required(true) })).allow(null), nominationId: Joi.string().max(36).regex(/^[A-Za-z0-9-]+$/),