[CI] Publish inframold charts (#838) #22
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: Upload Inframold Charts Artifacts | |
on: | |
push: | |
branches: | |
- 'main' | |
paths: | |
- '.github/workflows/update-artifacts.yml' | |
- 'charts/tfy-k8s-aws-eks-inframold/**' | |
- 'charts/tfy-k8s-azure-aks-inframold/**' | |
- 'charts/tfy-k8s-civo-talos-inframold/**' | |
- 'charts/tfy-k8s-gcp-gke-standard-inframold/**' | |
- 'charts/tfy-k8s-generic-inframold/**' | |
- 'scripts/generate-artifacts-manifest/**' | |
- 'scripts/upload-artifacts/**' | |
jobs: | |
upload-artifacts: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
env: | |
ARTIFACTORY_USERNAME: ${{ secrets.TRUEFOUNDRY_ARTIFACTORY_PUBLIC_USERNAME }} | |
ARTIFACTORY_PASSWORD: ${{ secrets.TRUEFOUNDRY_ARTIFACTORY_PUBLIC_PASSWORD }} | |
ARTIFACTORY_REPOSITORY_URL: ${{ vars.TRUEFOUNDRY_ARTIFACTORY_PUBLIC_REPOSITORY }} | |
ARTIFACTORY_HELM_REGISTRY_URL: ${{ vars.TRUEFOUNDRY_ARTIFACTORY_PUBLIC_HELM_REGISTRY }} | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
ref: ${{ github.head_ref }} | |
- name: Setup Kubectl | |
id: install-kubectl | |
uses: azure/setup-kubectl@v3 | |
with: | |
version: 'v1.28.0' | |
- name: Setup Helm | |
uses: azure/[email protected] | |
with: | |
version: v3.15.1 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- name: Install python dependencies | |
run: | | |
pip install -r scripts/upload-artifacts/requirements.txt | |
pip install -r scripts/generate-artifacts-manifest/requirements.txt | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Log in to JFrog Artifactory private | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ env.ARTIFACTORY_USERNAME }} | |
password: ${{ env.ARTIFACTORY_PASSWORD }} | |
registry: tfy.jfrog.io | |
- name: Upload Artifacts | |
run: | | |
charts_list=("tfy-k8s-aws-eks-inframold" "tfy-k8s-azure-aks-inframold" "tfy-k8s-gcp-gke-standard-inframold" "tfy-k8s-generic-inframold") | |
for chart in "${charts_list[@]}"; | |
do | |
python scripts/upload-artifacts/upload_artifacts.py \ | |
helm \ | |
charts/$chart/artifacts-manifest.json \ | |
${{ env.ARTIFACTORY_HELM_REGISTRY_URL}} | |
python scripts/upload-artifacts/upload_artifacts.py \ | |
image \ | |
charts/$chart/artifacts-manifest.json \ | |
${{ env.ARTIFACTORY_REPOSITORY_URL }} \ | |
--exclude-registries truefoundrycloud | |
done |