Denys Vuika 36c5c39311
[ACS-4535] rework docker publishing actions ()
* rework docker publishing actions

* simplify steps

* rollback AWS credentials
2023-03-16 13:26:45 -04:00

53 lines
1.3 KiB
YAML

name: "Publish Docker Images"
description: "Publish Docker Image to the provided registry"
inputs:
registry:
description: 'Docker registry'
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: Login to Docker Registry
uses: docker/login-action@v2
with:
registry: ${{ inputs.registry }}
username: ${{ inputs.username }}
password: ${{ inputs.password }}
- name: Get Tag
uses: ./.github/actions/get-image-tag
with:
branch_name: ${{ inputs.branch_name }}
- name: Publish
if: ${{ github.event.inputs.dry-run != 'true' }}
shell: bash
run: |
npm ci && npm run build.release
echo "Running the docker with tag $TAG_VERSION"
npx @alfresco/adf-cli docker-publish \
--dockerRepo "${{ inputs.registry }}/alfresco/alfresco-content-app" \
--buildArgs "PROJECT_NAME=content-ce" \
--dockerTags "$TAG_VERSION" \
--pathProject "$(pwd)"