65 lines
1.8 KiB
YAML
65 lines
1.8 KiB
YAML
name: Updatecli deploy
|
|
description: Use Updatecli to update deployments for ArgoCD
|
|
|
|
inputs:
|
|
updatecli-config:
|
|
description: Override default updatecli config
|
|
default: ${{ forge.action_path }}/updatecli.yaml
|
|
registry-url:
|
|
description: Registry URL
|
|
default: git.cleverthis.com
|
|
registry-user:
|
|
description: Registry user
|
|
required: true
|
|
registry-password:
|
|
description: Registry password
|
|
required: true
|
|
charts-repo-org:
|
|
description: Charts repo organization
|
|
default: infra
|
|
charts-repo-name:
|
|
description: Charts repo name
|
|
default: charts
|
|
name:
|
|
description: Repo name
|
|
required: true
|
|
ref-name:
|
|
description: Git ref name
|
|
required: true
|
|
docker-tag:
|
|
description: Docker image tag
|
|
required: true
|
|
|
|
runs:
|
|
using: composite
|
|
|
|
steps:
|
|
- name: Install updatecli
|
|
uses: https://github.com/updatecli/updatecli-action@v2
|
|
|
|
- name: Update Helm chart
|
|
shell: bash
|
|
env:
|
|
REGISTRY_URL: https://${{ inputs.registry-url }}
|
|
REGISTRY_USER: ${{ inputs.registry-user }}
|
|
REGISTRY_PASSWORD: ${{ inputs.registry-password }}
|
|
CHARTS_REPO_ORG: ${{ inputs.charts-repo-org }}
|
|
CHARTS_REPO_NAME: ${{ inputs.charts-repo-name }}
|
|
run: |
|
|
export TARGET_NAME=${{ inputs.name }}
|
|
|
|
export NEW_APP_VERSION=${{ inputs.docker-tag }}
|
|
echo "New app version: $NEW_APP_VERSION"
|
|
|
|
if [ "${{ inputs.ref-name }}" = "main" ] || [ "${{ inputs.ref-name }}" = "master" ]; then
|
|
TARGET_BRANCH=master
|
|
elif [ "${{ inputs.ref-name }}" = "develop" ]; then
|
|
TARGET_BRANCH=develop
|
|
else
|
|
echo "Unknown target branch. We are not coming from main, master, nor develop branch."
|
|
exit 1
|
|
fi
|
|
|
|
export TARGET_BRANCH
|
|
updatecly apply --config ${{ inputs.updatecli-config }}
|