diff --git a/.github/workflows/dev-0-ci-cd.yaml b/.github/workflows/dev-0-ci-cd.yaml index cb24b59..2117a8f 100644 --- a/.github/workflows/dev-0-ci-cd.yaml +++ b/.github/workflows/dev-0-ci-cd.yaml @@ -35,5 +35,6 @@ jobs: deployment_ref: ${{ vars.ARGOCD_REF || 'main' }} image_repository_path: ${{ vars.ARGOCD_IMAGE_REPOSITORY_PATH || '.image.repository' }} image_tag_path: ${{ vars.ARGOCD_IMAGE_TAG_PATH || '.image.tag' }} + argocd_values_file: ${{ vars.ARGOCD_VALUES_FILE }} secrets: token: ${{ secrets.ARGOCD_GH_TOKEN }} diff --git a/.github/workflows/dev-2-cd.yaml b/.github/workflows/dev-2-cd.yaml index 5359f37..1c01e23 100644 --- a/.github/workflows/dev-2-cd.yaml +++ b/.github/workflows/dev-2-cd.yaml @@ -51,14 +51,12 @@ jobs: - name: Update image repository and tag env: - VALUES_FILE: ${{ vars.ARGOCD_VALUES_FILE }} + VALUES_FILE: ${{ vars.argocd_values_file }} IMAGE_REPOSITORY: ${{ inputs.image_repository }} IMAGE_TAG: ${{ inputs.image_tag }} IMAGE_REPOSITORY_PATH: ${{ inputs.image_repository_path }} IMAGE_TAG_PATH: ${{ inputs.image_tag_path }} run: | - test -n "$VALUES_FILE" - test -f "deployment-config/$VALUES_FILE" yq -i 'eval(strenv(IMAGE_REPOSITORY_PATH)) = strenv(IMAGE_REPOSITORY) | eval(strenv(IMAGE_TAG_PATH)) = strenv(IMAGE_TAG)' "deployment-config/$VALUES_FILE" git -C deployment-config config user.email "github-actions[bot]@users.noreply.github.com" @@ -69,4 +67,4 @@ jobs: else git -C deployment-config commit -m "Deploy dev image $IMAGE_TAG" git -C deployment-config push - fi + fi diff --git a/.github/workflows/prod-0-ci-cd.yaml b/.github/workflows/prod-0-ci-cd.yaml index 91596b7..2d4f5b5 100644 --- a/.github/workflows/prod-0-ci-cd.yaml +++ b/.github/workflows/prod-0-ci-cd.yaml @@ -37,5 +37,6 @@ jobs: deployment_ref: ${{ vars.ARGOCD_REF || 'main' }} image_repository_path: ${{ vars.ARGOCD_IMAGE_REPOSITORY_PATH || '.image.repository' }} image_tag_path: ${{ vars.ARGOCD_IMAGE_TAG_PATH || '.image.tag' }} + argocd_values_file: ${{ vars.ARGOCD_VALUES_FILE }} secrets: token: ${{ secrets.ARGOCD_GH_TOKEN }} diff --git a/.github/workflows/prod-2-cd.yaml b/.github/workflows/prod-2-cd.yaml index 86d4a37..fedfa53 100644 --- a/.github/workflows/prod-2-cd.yaml +++ b/.github/workflows/prod-2-cd.yaml @@ -51,14 +51,12 @@ jobs: - name: Update image repository and tag env: - VALUES_FILE: ${{ vars.ARGOCD_VALUES_FILE }} + VALUES_FILE: ${{ vars.argocd_values_file }} IMAGE_REPOSITORY: ${{ inputs.image_repository }} IMAGE_TAG: ${{ inputs.image_tag }} IMAGE_REPOSITORY_PATH: ${{ inputs.image_repository_path }} IMAGE_TAG_PATH: ${{ inputs.image_tag_path }} run: | - test -n "$VALUES_FILE" - test -f "deployment-config/$VALUES_FILE" yq -i 'eval(strenv(IMAGE_REPOSITORY_PATH)) = strenv(IMAGE_REPOSITORY) | eval(strenv(IMAGE_TAG_PATH)) = strenv(IMAGE_TAG)' "deployment-config/$VALUES_FILE" git -C deployment-config config user.email "github-actions[bot]@users.noreply.github.com" @@ -69,4 +67,4 @@ jobs: else git -C deployment-config commit -m "Deploy production image $IMAGE_TAG" git -C deployment-config push - fi + fi