mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2026-09-09 18:02:54 +00:00
[ACA-4653] Migrate release workflow to GHA (#3027)
* [ACA-4653] Run ACA upstream on schedule * [ACA-4653] Migrate release workflow to GHA * [ACA-4653] Consistency in naming * [ACA-4653] Use GH action to configure GH author * [ACA-4653] Dedicated sh for publish Docker image job * [ACA-4653] Add missing variables * [ACA-4653] Delete Travis.yml * [ACA-4653] CR fixes * [ACA-4653] Add branch name as action input * [ACA-4653] Proper env var usage in workflow
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
name: "Publish GitHub Tag"
|
||||
description: "Publish GitHub Tag"
|
||||
|
||||
inputs:
|
||||
github_token:
|
||||
description: 'Github token'
|
||||
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: publish tag
|
||||
shell: bash
|
||||
run: |
|
||||
if [[ ${{ inputs.branch_name }} == "master" ]]; then
|
||||
VERSION=$(grep -m1 version package.json | awk '{ print $2 }' | sed 's/[", ]//g')
|
||||
fi;
|
||||
|
||||
echo "git tag -a ${VERSION} -m ${VERSION}"
|
||||
if [[ ${{ inputs.dry-run }} == false ]]; then
|
||||
git tag -a ${VERSION} -m "${VERSION} [ci skip] "
|
||||
git remote rm origin
|
||||
GITHUB_REPO=https://${{ inputs.github_token }}:x-oauth-basic@github.com/Alfresco/alfresco-content-app.git
|
||||
git remote add origin $GITHUB_REPO
|
||||
git push origin --tags
|
||||
fi;
|
||||
Reference in New Issue
Block a user