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>
41 lines
1.2 KiB
YAML
41 lines
1.2 KiB
YAML
name: "Publish Docker Images"
|
|
description: "Publish Docker image to quay.io or dockerhub or another domain - only publish the version on master - elsewhere version and branch"
|
|
|
|
inputs:
|
|
domain:
|
|
description: 'domain to publish image to'
|
|
required: true
|
|
type: string
|
|
username:
|
|
description: 'login username'
|
|
required: true
|
|
type: string
|
|
password:
|
|
description: 'login password'
|
|
required: true
|
|
type: string
|
|
branch_name:
|
|
description: 'Name of the branch the workflow runs on'
|
|
required: true
|
|
type: string
|
|
dry-run:
|
|
description: dry run flag
|
|
required: true
|
|
type: boolean
|
|
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- name: Get docker image tag name
|
|
shell: bash
|
|
run: |
|
|
if [[ ${{ inputs.branch_name }} == "master" ]]; then
|
|
TAG_VERSION=$(grep -m1 version package.json | awk '{ print $2 }' | sed 's/[", ]//g')
|
|
else
|
|
TAG_VERSION=${{ inputs.branch_name }}-${{ github.run_id }}
|
|
fi
|
|
echo "TAG_VERSION=$TAG_VERSION" >> $GITHUB_ENV
|
|
- name: Publish image
|
|
shell: bash
|
|
run: ./scripts/travis/deploy/publish.sh ${{ inputs.domain }} ${{ inputs.username }} ${{ inputs.password }} $TAG_VERSION ${{ inputs.branch_name }} ${{ inputs.dry-run }}
|