This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Push image to JFROG Public | |
on: | |
push: | |
branches: | |
- 'main' | |
- 'pushing_to' | |
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' | |
# depot_project_id: ${{ vars.DEPOT_PROJECT_ID }} | |
artifactory_registry_url: ${{ vars.TRUEFOUNDRY_ARTIFACTORY_REGISTRY_URL }} | |
artifactory_repository_url: ${{ vars.TRUEFOUNDRY_ARTIFACTORY_PUBLIC_REPOSITORY }} | |
secrets: | |
# depot_token: ${{ secrets.DEPOT_API_KEY }} | |
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' | |
# depot_project_id: ${{ vars.DEPOT_PROJECT_ID }} | |
artifactory_registry_url: ${{ vars.TRUEFOUNDRY_ARTIFACTORY_REGISTRY_URL }} | |
artifactory_repository_url: ${{ vars.TRUEFOUNDRY_ARTIFACTORY_PUBLIC_REPOSITORY }} | |
secrets: | |
# depot_token: ${{ secrets.DEPOT_API_KEY }} | |
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: Sync charts from main | |
run: | | |
# Removing charts directory and copying fresh from main | |
git checkout pushing_to -- 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" --signoff | |
git push --force origin helm-main |