Skip to content

Revert "Call reconcile from server (#58)" (#59) #35

Revert "Call reconcile from server (#58)" (#59)

Revert "Call reconcile from server (#58)" (#59) #35

name: Push image to JFROG Public
on:
push:
branches:
- 'main'
permissions:
id-token: write
contents: read
jobs:
build-operator:
name: Build and Push Operator Docker Images
uses: truefoundry/github-workflows-public/.github/workflows/[email protected]
with:
image_tag: ${{ github.sha }}
image_artifact_name: 'elasti-operator'
dockerfile_path: 'operator/Dockerfile'
artifactory_registry_url: ${{ vars.TRUEFOUNDRY_ARTIFACTORY_REGISTRY_URL }}
artifactory_repository_url: ${{ vars.TRUEFOUNDRY_ARTIFACTORY_PUBLIC_REPOSITORY }}
secrets:
artifactory_username: ${{ secrets.TRUEFOUNDRY_ARTIFACTORY_PUBLIC_USERNAME }}
artifactory_password: ${{ secrets.TRUEFOUNDRY_ARTIFACTORY_PUBLIC_PASSWORD }}
build-resolver:
name: Build and Push Resolver Docker Images
uses: truefoundry/github-workflows-public/.github/workflows/[email protected]
with:
image_tag: ${{ github.sha }}
image_artifact_name: 'elasti-resolver'
dockerfile_path: 'resolver/Dockerfile'
artifactory_registry_url: ${{ vars.TRUEFOUNDRY_ARTIFACTORY_REGISTRY_URL }}
artifactory_repository_url: ${{ vars.TRUEFOUNDRY_ARTIFACTORY_PUBLIC_REPOSITORY }}
secrets:
artifactory_username: ${{ secrets.TRUEFOUNDRY_ARTIFACTORY_PUBLIC_USERNAME }}
artifactory_password: ${{ secrets.TRUEFOUNDRY_ARTIFACTORY_PUBLIC_PASSWORD }}
# We are updating the sha in the helm chart values.yaml file on the helm-main branch
update-helm-chart:
name: Update Helm values.yaml
runs-on: ubuntu-latest
permissions:
contents: write
needs: [build-operator, build-resolver]
steps:
- name: Checkout helm-main branch
uses: actions/checkout@v4
with:
fetch-depth: "0"
ref: helm-main
- name: Fetch main branch
run: git fetch origin main:main
- name: Sync charts from main
run: |
# Removing charts directory and copying fresh from main
git fetch origin main:main
rm -rf charts/
git checkout main -- charts/
- name: Update Helm values.yaml
run: |
cd charts/elasti
yq -i '.elastiController.manager.image.tag="${{ github.sha }}"' values.yaml
yq -i '.elastiResolver.proxy.image.tag="${{ github.sha }}"' values.yaml
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
git add values.yaml
git commit -m "Update Helm values.yaml on helm-main branch with sha: ${{ github.sha }}" --signoff
git push --force origin helm-main