From af4240d20f164da2750ea70c2de5f85cbb550610 Mon Sep 17 00:00:00 2001 From: daviemukungi Date: Thu, 17 Oct 2024 09:38:23 +0300 Subject: [PATCH] disable automated deployment --- .github/workflows/build_upload.yml | 134 ++++++++++++------------ .github/workflows/pull_translations.yml | 80 +++++++------- 2 files changed, 107 insertions(+), 107 deletions(-) diff --git a/.github/workflows/build_upload.yml b/.github/workflows/build_upload.yml index e8184c8d0..8beaebdbe 100644 --- a/.github/workflows/build_upload.yml +++ b/.github/workflows/build_upload.yml @@ -1,4 +1,4 @@ -name: Build and Upload +# name: Build and Upload # on: # push: # branches: @@ -16,75 +16,75 @@ name: Build and Upload # - 'release-*' # workflow_dispatch: -jobs: - build-publish-docker-helm: - name: Build & Publish Docker Image & Helm Chart - runs-on: ubuntu-latest - env: - HELM_CHART_PATH: package/helm - steps: - - uses: actions/checkout@v2 - - name: Set env.ARTIFACT_VERSION - run: | - wget -q https://raw.githubusercontent.com/Bahmni/bahmni-infra-utils/main/setArtifactVersion.sh && chmod +x setArtifactVersion.sh - ./setArtifactVersion.sh - rm setArtifactVersion.sh - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Docker - Login - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKER_HUB_USERNAME }} - password: ${{ secrets.DOCKER_HUB_TOKEN }} - - name: Docker - Build and push - uses: docker/build-push-action@v3 - with: - context: . - file: package/docker/Dockerfile - platforms: linux/amd64,linux/arm64 - push: true - tags: bahmni/standard-config:${{env.ARTIFACT_VERSION}},bahmni/standard-config:latest - - name: Push Translations to Transifex - run: | - curl -o transifex.sh https://raw.githubusercontent.com/Bahmni/bahmni-infra-utils/main/transifex.sh - chmod +x transifex.sh - ./transifex.sh push - rm transifex.sh - env: - TX_TOKEN: ${{ secrets.TX_TOKEN }} - - name: Update Version and Image Tag - run: | - yq --inplace '.image.tag = "${{ env.ARTIFACT_VERSION }}"' $HELM_CHART_PATH/values.yaml - yq --inplace '.version = "${{ env.ARTIFACT_VERSION }}"' $HELM_CHART_PATH/Chart.yaml +# jobs: +# build-publish-docker-helm: +# name: Build & Publish Docker Image & Helm Chart +# runs-on: ubuntu-latest +# env: +# HELM_CHART_PATH: package/helm +# steps: +# - uses: actions/checkout@v2 +# - name: Set env.ARTIFACT_VERSION +# run: | +# wget -q https://raw.githubusercontent.com/Bahmni/bahmni-infra-utils/main/setArtifactVersion.sh && chmod +x setArtifactVersion.sh +# ./setArtifactVersion.sh +# rm setArtifactVersion.sh +# - name: Set up QEMU +# uses: docker/setup-qemu-action@v2 +# - name: Set up Docker Buildx +# uses: docker/setup-buildx-action@v2 +# - name: Docker - Login +# uses: docker/login-action@v2 +# with: +# username: ${{ secrets.DOCKER_HUB_USERNAME }} +# password: ${{ secrets.DOCKER_HUB_TOKEN }} +# - name: Docker - Build and push +# uses: docker/build-push-action@v3 +# with: +# context: . +# file: package/docker/Dockerfile +# platforms: linux/amd64,linux/arm64 +# push: true +# tags: bahmni/standard-config:${{env.ARTIFACT_VERSION}},bahmni/standard-config:latest +# - name: Push Translations to Transifex +# run: | +# curl -o transifex.sh https://raw.githubusercontent.com/Bahmni/bahmni-infra-utils/main/transifex.sh +# chmod +x transifex.sh +# ./transifex.sh push +# rm transifex.sh +# env: +# TX_TOKEN: ${{ secrets.TX_TOKEN }} +# - name: Update Version and Image Tag +# run: | +# yq --inplace '.image.tag = "${{ env.ARTIFACT_VERSION }}"' $HELM_CHART_PATH/values.yaml +# yq --inplace '.version = "${{ env.ARTIFACT_VERSION }}"' $HELM_CHART_PATH/Chart.yaml - - name: Helm Lint - run: helm lint $HELM_CHART_PATH +# - name: Helm Lint +# run: helm lint $HELM_CHART_PATH - - name: Helm Package - run: helm package $HELM_CHART_PATH +# - name: Helm Package +# run: helm package $HELM_CHART_PATH - - name: Checkout Charts Repository - uses: actions/checkout@v2 - with: - repository: Bahmni/helm-charts - ref: gh-pages - path: helm-charts - persist-credentials: false +# - name: Checkout Charts Repository +# uses: actions/checkout@v2 +# with: +# repository: Bahmni/helm-charts +# ref: gh-pages +# path: helm-charts +# persist-credentials: false - - name: Copy Helm Archive - run: mkdir -p helm-charts/standard-config/ && cp standard-config-${{ env.ARTIFACT_VERSION }}.tgz helm-charts/standard-config/ +# - name: Copy Helm Archive +# run: mkdir -p helm-charts/standard-config/ && cp standard-config-${{ env.ARTIFACT_VERSION }}.tgz helm-charts/standard-config/ - - name: Helm Index - working-directory: helm-charts/ - run: helm repo index --merge index.yaml --url https://bahmni.github.io/helm-charts/ . +# - name: Helm Index +# working-directory: helm-charts/ +# run: helm repo index --merge index.yaml --url https://bahmni.github.io/helm-charts/ . - - name: Commit and Push Chart Repository - working-directory: helm-charts/ - run: | - git config user.name ${{ secrets.BAHMNI_USERNAME}} - git config user.email ${{ secrets.BAHMNI_EMAIL}} - git add . - git commit -m "Release of standard-config-${{ env.ARTIFACT_VERSION }}" - git push 'https://${{ secrets.BAHMNI_USERNAME}}:${{ secrets.BAHMNI_PAT}}@github.com/bahmni/helm-charts.git' gh-pages +# - name: Commit and Push Chart Repository +# working-directory: helm-charts/ +# run: | +# git config user.name ${{ secrets.BAHMNI_USERNAME}} +# git config user.email ${{ secrets.BAHMNI_EMAIL}} +# git add . +# git commit -m "Release of standard-config-${{ env.ARTIFACT_VERSION }}" +# git push 'https://${{ secrets.BAHMNI_USERNAME}}:${{ secrets.BAHMNI_PAT}}@github.com/bahmni/helm-charts.git' gh-pages diff --git a/.github/workflows/pull_translations.yml b/.github/workflows/pull_translations.yml index 359fe3807..7e2d0d88c 100644 --- a/.github/workflows/pull_translations.yml +++ b/.github/workflows/pull_translations.yml @@ -1,46 +1,46 @@ -name: Pull Translations from Transifex +# name: Pull Translations from Transifex -on: - schedule: - - cron: '0 0 1 * *' - workflow_dispatch: +# on: +# schedule: +# - cron: '0 0 1 * *' +# workflow_dispatch: -jobs: - pull-translations: - name: Pull Translations from Transifex - runs-on: ubuntu-latest - permissions: - contents: write +# jobs: +# pull-translations: +# name: Pull Translations from Transifex +# runs-on: ubuntu-latest +# permissions: +# contents: write - steps: - - name: Checkout code - uses: actions/checkout@v3 +# steps: +# - name: Checkout code +# uses: actions/checkout@v3 - - name: Pull Translations from Transifex - run: | - curl -o transifex.sh https://raw.githubusercontent.com/Bahmni/bahmni-infra-utils/main/transifex.sh - chmod +x transifex.sh - ./transifex.sh pull - rm transifex.sh - env: - TX_TOKEN: ${{ secrets.TX_TOKEN }} +# - name: Pull Translations from Transifex +# run: | +# curl -o transifex.sh https://raw.githubusercontent.com/Bahmni/bahmni-infra-utils/main/transifex.sh +# chmod +x transifex.sh +# ./transifex.sh pull +# rm transifex.sh +# env: +# TX_TOKEN: ${{ secrets.TX_TOKEN }} - - name: Commit and push changes - id: auto-commit-action - uses: stefanzweifel/git-auto-commit-action@v4 - with: - commit_message: "[Bahmni Infra] | Add. Update Translation Resources" - branch: ${{ github.ref }} - file_pattern: 'openmrs/i18n/**/*.json' - repository: . - commit_user_name: Bahmni Infra - commit_user_email: infrastructure@bahmni.org - commit_author: bahmni-infra +# - name: Commit and push changes +# id: auto-commit-action +# uses: stefanzweifel/git-auto-commit-action@v4 +# with: +# commit_message: "[Bahmni Infra] | Add. Update Translation Resources" +# branch: ${{ github.ref }} +# file_pattern: 'openmrs/i18n/**/*.json' +# repository: . +# commit_user_name: Bahmni Infra +# commit_user_email: infrastructure@bahmni.org +# commit_author: bahmni-infra - - name: Check for changes - run: | - if [[ steps.auto-commit-action.outputs.changes_detected == 'true' ]]; then - echo "Changes Detected. Translation Resources Updated." - else - echo "No Changes Detected. Project Already Up-To-Date." - fi \ No newline at end of file +# - name: Check for changes +# run: | +# if [[ steps.auto-commit-action.outputs.changes_detected == 'true' ]]; then +# echo "Changes Detected. Translation Resources Updated." +# else +# echo "No Changes Detected. Project Already Up-To-Date." +# fi \ No newline at end of file