mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-05-12 17:04:46 +00:00
* fix publish libs action * push tags only for master * fix publishing only for master * fix leaking sensitive info in the echo * fix publish script and passing branch name to action * fix incorrect travis branch * consistent input naming * npm tag as input * Update .github/workflows/release.yml Co-authored-by: Giovanni Toraldo <me@gionn.net> * Update .github/workflows/release.yml Co-authored-by: Giovanni Toraldo <me@gionn.net> * remove not really necessary workflow_call triggers * fixup job conditionals with ref_name * setup job is not really doing anything useful * add setup node to npm publish step * add missing npm install to publish libs * Update scripts/travis/deploy/publish.sh Co-authored-by: Alex Chapellon <alxgomz@gmail.com> * Update scripts/travis/deploy/publish.sh Co-authored-by: Alex Chapellon <alxgomz@gmail.com> * Update .github/actions/git-tag/action.yml Co-authored-by: Alex Chapellon <alxgomz@gmail.com> --------- Co-authored-by: Giovanni Toraldo <me@gionn.net> Co-authored-by: Giovanni Toraldo <giovanni.toraldo@hyland.com> Co-authored-by: Alex Chapellon <alxgomz@gmail.com>
26 lines
1.0 KiB
Bash
Executable File
26 lines
1.0 KiB
Bash
Executable File
#!/bin/bash -e
|
|
|
|
DOMAIN="$1"
|
|
USERNAME="$2"
|
|
PASSWORD="$3"
|
|
TAG_VERSION="$4"
|
|
BRANCH_NAME="$5"
|
|
DRY_RUN="$6"
|
|
|
|
npm ci && npm run build.release
|
|
|
|
echo "Running the docker with tag" $TAG_VERSION
|
|
DOCKER_PROJECT_ARGS="PROJECT_NAME=content-ce"
|
|
DOCKER_REPOSITORY="$DOMAIN/$REPO_SLUG"
|
|
|
|
# Publish Image to quay.io or dockerhub or another domain - only publish the version on master - elsewhere version and branch
|
|
if [[ "$BRANCH_NAME" == "master" ]]; then
|
|
if [[ "$DRY_RUN" == "false" ]]; then
|
|
npx @alfresco/adf-cli docker-publish --loginCheck --loginUsername "$USERNAME" --loginPassword "$PASSWORD" --loginRepo "$DOMAIN" --dockerRepo "$DOCKER_REPOSITORY" --buildArgs "$DOCKER_PROJECT_ARGS" --dockerTags "$TAG_VERSION" --pathProject "$(pwd)"
|
|
fi;
|
|
else
|
|
if [[ "$DRY_RUN "== "false" ]]; then
|
|
npx @alfresco/adf-cli docker-publish --loginCheck --loginUsername "$USERNAME" --loginPassword "$PASSWORD" --loginRepo "$DOMAIN" --dockerRepo "$DOCKER_REPOSITORY" --buildArgs "$DOCKER_PROJECT_ARGS" --dockerTags "$TAG_VERSION,$BRANCH_NAME" --pathProject "$(pwd)"
|
|
fi;
|
|
fi;
|