mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-31 17:38:28 +00:00
[ACA-4722] - fix publish image script (#3511)
This commit is contained in:
2
.github/actions/get-image-tag/action.yml
vendored
2
.github/actions/get-image-tag/action.yml
vendored
@@ -16,6 +16,6 @@ runs:
|
|||||||
if [[ "${{ inputs.branch_name }}" == "master" ]]; then
|
if [[ "${{ inputs.branch_name }}" == "master" ]]; then
|
||||||
TAG_VERSION="$(jq -cr '.version' < package.json)"
|
TAG_VERSION="$(jq -cr '.version' < package.json)"
|
||||||
else
|
else
|
||||||
TAG_VERSION="${{ inputs.branch_name }}-${{ github.run_id }},${{ inputs.branch_name }}"
|
TAG_VERSION="${{ inputs.branch_name }}-${{ github.run_id }}"
|
||||||
fi
|
fi
|
||||||
echo "TAG_VERSION=$TAG_VERSION" >> $GITHUB_ENV
|
echo "TAG_VERSION=$TAG_VERSION" >> $GITHUB_ENV
|
||||||
|
22
.github/actions/publish-image/action.yml
vendored
22
.github/actions/publish-image/action.yml
vendored
@@ -5,23 +5,18 @@ inputs:
|
|||||||
registry:
|
registry:
|
||||||
description: 'Docker registry'
|
description: 'Docker registry'
|
||||||
required: true
|
required: true
|
||||||
type: string
|
|
||||||
username:
|
username:
|
||||||
description: 'login username'
|
description: 'login username'
|
||||||
required: true
|
required: true
|
||||||
type: string
|
|
||||||
password:
|
password:
|
||||||
description: 'login password'
|
description: 'login password'
|
||||||
required: true
|
required: true
|
||||||
type: string
|
|
||||||
branch_name:
|
|
||||||
description: 'Name of the branch the workflow runs on'
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
dry-run:
|
dry-run:
|
||||||
description: dry run flag
|
description: 'dry run flag'
|
||||||
|
required: true
|
||||||
|
tag_version:
|
||||||
|
description: 'tag version'
|
||||||
required: true
|
required: true
|
||||||
type: boolean
|
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
@@ -39,11 +34,6 @@ runs:
|
|||||||
username: ${{ inputs.username }}
|
username: ${{ inputs.username }}
|
||||||
password: ${{ inputs.password }}
|
password: ${{ inputs.password }}
|
||||||
|
|
||||||
- name: Get Tag
|
|
||||||
uses: ./.github/actions/get-image-tag
|
|
||||||
with:
|
|
||||||
branch_name: ${{ inputs.branch_name }}
|
|
||||||
|
|
||||||
- name: Install dependencies and build project
|
- name: Install dependencies and build project
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
@@ -55,5 +45,5 @@ runs:
|
|||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
push: ${{ github.event.inputs.dry-run != 'true' }}
|
push: ${{ inputs.dry-run != 'true' }}
|
||||||
tags: ${{ inputs.registry }}/alfresco/alfresco-content-app:${{ env.TAG_VERSION }}
|
tags: ${{ inputs.registry }}/alfresco/alfresco-content-app:${{ inputs.tag_version }}
|
||||||
|
16
.github/workflows/release.yml
vendored
16
.github/workflows/release.yml
vendored
@@ -37,11 +37,17 @@ jobs:
|
|||||||
node-version-file: '.nvmrc'
|
node-version-file: '.nvmrc'
|
||||||
cache: 'npm'
|
cache: 'npm'
|
||||||
- uses: ./.github/actions/setup
|
- uses: ./.github/actions/setup
|
||||||
|
|
||||||
|
- name: Get Tag
|
||||||
|
uses: ./.github/actions/get-image-tag
|
||||||
|
with:
|
||||||
|
branch_name: ${{ env.BRANCH_NAME }}
|
||||||
|
|
||||||
- name: publish
|
- name: publish
|
||||||
uses: ./.github/actions/publish-image
|
uses: ./.github/actions/publish-image
|
||||||
with:
|
with:
|
||||||
branch_name: ${{ env.BRANCH_NAME }}
|
|
||||||
registry: quay.io
|
registry: quay.io
|
||||||
|
tag_version: ${{ env.TAG_VERSION }}
|
||||||
username: ${{ secrets.QUAY_USERNAME }}
|
username: ${{ secrets.QUAY_USERNAME }}
|
||||||
password: ${{ secrets.QUAY_PASSWORD }}
|
password: ${{ secrets.QUAY_PASSWORD }}
|
||||||
dry-run: ${{ inputs.dry-run-release }}
|
dry-run: ${{ inputs.dry-run-release }}
|
||||||
@@ -60,11 +66,17 @@ jobs:
|
|||||||
node-version-file: '.nvmrc'
|
node-version-file: '.nvmrc'
|
||||||
cache: 'npm'
|
cache: 'npm'
|
||||||
- uses: ./.github/actions/setup
|
- uses: ./.github/actions/setup
|
||||||
|
|
||||||
|
- name: Get Tag
|
||||||
|
uses: ./.github/actions/get-image-tag
|
||||||
|
with:
|
||||||
|
branch_name: ${{ env.BRANCH_NAME }}
|
||||||
|
|
||||||
- name: publish
|
- name: publish
|
||||||
uses: ./.github/actions/publish-image
|
uses: ./.github/actions/publish-image
|
||||||
with:
|
with:
|
||||||
branch_name: ${{ env.BRANCH_NAME }}
|
|
||||||
registry: docker.io
|
registry: docker.io
|
||||||
|
tag_version: ${{ env.TAG_VERSION }}
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
dry-run: ${{ inputs.dry-run-release }}
|
dry-run: ${{ inputs.dry-run-release }}
|
||||||
|
Reference in New Issue
Block a user