From c0a13b00f43e07259fc3f545c3514e53bec4c6ea Mon Sep 17 00:00:00 2001 From: Michael Puehringer Date: Wed, 19 Feb 2025 10:52:13 +0100 Subject: [PATCH] Rename workflows --- .../build-docker-artifacts-config.schema.json | 2 +- ...-customer.yml => build-docker-artifacts-push.yml} | 0 ...r.yml => build-docker-artifacts-trigger-push.yml} | 0 .github/workflows/build-docker-artifacts.yml | 12 ++++++------ 4 files changed, 7 insertions(+), 7 deletions(-) rename .github/workflows/{build-docker-artifacts-push-to-customer.yml => build-docker-artifacts-push.yml} (100%) rename .github/workflows/{build-docker-artifacts-trigger-push-to-customer.yml => build-docker-artifacts-trigger-push.yml} (100%) diff --git a/.github/workflows/build-docker-artifacts-config.schema.json b/.github/workflows/build-docker-artifacts-config.schema.json index 72626894..22caacc5 100644 --- a/.github/workflows/build-docker-artifacts-config.schema.json +++ b/.github/workflows/build-docker-artifacts-config.schema.json @@ -105,5 +105,5 @@ } } }, - "required": ["flavors"] + "required": ["build"] } diff --git a/.github/workflows/build-docker-artifacts-push-to-customer.yml b/.github/workflows/build-docker-artifacts-push.yml similarity index 100% rename from .github/workflows/build-docker-artifacts-push-to-customer.yml rename to .github/workflows/build-docker-artifacts-push.yml diff --git a/.github/workflows/build-docker-artifacts-trigger-push-to-customer.yml b/.github/workflows/build-docker-artifacts-trigger-push.yml similarity index 100% rename from .github/workflows/build-docker-artifacts-trigger-push-to-customer.yml rename to .github/workflows/build-docker-artifacts-trigger-push.yml diff --git a/.github/workflows/build-docker-artifacts.yml b/.github/workflows/build-docker-artifacts.yml index e5777df4..690f444d 100644 --- a/.github/workflows/build-docker-artifacts.yml +++ b/.github/workflows/build-docker-artifacts.yml @@ -78,7 +78,7 @@ jobs: const imageTagBranchName = "${{ github.ref }}".replace('refs/heads/', '').replace('refs/tags/', '').replace(/[^a-zA-Z0-9._-]/g, '-'); const imageTag = `tagged-${imageTagBranchName}-${buildTime}`; - const flavors = Object.entries(config.build).filter([id, flavor] => flavor.skip !== true).map([id, flavor] => { + const flavors = Object.entries(config.build).filter(([id, flavor]) => flavor.skip !== true).map(([id, flavor]) => { return { ...flavor, id, @@ -107,7 +107,7 @@ jobs: const result = { flavors, components: flattenedComponents, - customers: Object.keys(config.push).join(','), + push_to: Object.keys(config.push).join(','), }; console.log(result); return result; @@ -292,13 +292,13 @@ jobs: shell: bash run: docker logout ${{ steps.login-ecr.outputs.registry }} - push-to-customers: - name: Push images to customers + push-to-repositories: + name: Push images to push targets # if? When should we do this? Always? Only for certain branches? If so, how should we define that, in the config.json? needs: [retag-images, get-flavors] - uses: datavisyn/github-workflows/.github/workflows/build-docker-artifacts-trigger-push-to-customer.yml@mp/push_docker + uses: datavisyn/github-workflows/.github/workflows/build-docker-artifacts-trigger-push.yml@mp/push_docker secrets: inherit with: - customers: ${{ fromJson(needs.get-flavors.outputs.result).customers }} + push_to: ${{ fromJson(needs.get-flavors.outputs.result).push_to }} branch: ${{ inputs.branch }} runs_on: ${{ inputs.runs_on || 'ubuntu-22.04' }}