diff --git a/.github/workflows/api-multi-module-workflow.yml b/.github/workflows/api-multi-module-workflow.yml index 7132e51..cadcbd8 100644 --- a/.github/workflows/api-multi-module-workflow.yml +++ b/.github/workflows/api-multi-module-workflow.yml @@ -23,6 +23,14 @@ on: description: "Using for disable pushing to ECR if value is true." required: true type: boolean + IS_COPY_DOCKERFILE: + description: "Using for copy default dockerfile." + required: true + type: boolean + IS_COPY_DOCKER_DIRECTORY: + description: "Using for copy default docker directory (entrypoint, cron, healthcheck)." + required: true + type: boolean secrets: SECRET_GITHUB_TOKEN: required: true @@ -63,6 +71,16 @@ jobs: GITHUB_USERNAME: ${{ secrets.SECRET_GITHUB_USERNAME }} GITHUB_TOKEN: ${{ secrets.SECRET_GITHUB_TOKEN }} + - name: Copy docker directory + if: ${{ inputs.IS_COPY_DOCKER_DIRECTORY }} + run: cp -r /docker/api/docker ./ + working-directory: ${{ inputs.MODULE_NAME }} + + - name: Copy dockerfile + if: ${{ inputs.IS_COPY_DOCKERFILE }} + run: cp /docker/api/Dockerfile ./ + working-directory: ${{ inputs.MODULE_NAME }} + - name: Login to Amazon ECR if: ${{ inputs.ECR_PUSH_ENABLED }} id: login-ecr diff --git a/.github/workflows/api-single-module-workflow.yml b/.github/workflows/api-single-module-workflow.yml index 03946c5..11d0f64 100644 --- a/.github/workflows/api-single-module-workflow.yml +++ b/.github/workflows/api-single-module-workflow.yml @@ -19,6 +19,14 @@ on: description: "Using for disable pushing to ECR if value is true." required: true type: boolean + IS_COPY_DOCKERFILE: + description: "Using for copy default dockerfile." + required: true + type: boolean + IS_COPY_DOCKER_DIRECTORY: + description: "Using for copy default docker directory (entrypoint, cron, healthcheck)." + required: true + type: boolean secrets: SECRET_GITHUB_TOKEN: required: true @@ -59,6 +67,14 @@ jobs: GITHUB_USERNAME: ${{ secrets.SECRET_GITHUB_USERNAME }} GITHUB_TOKEN: ${{ secrets.SECRET_GITHUB_TOKEN }} + - name: Copy docker directory + if: ${{ inputs.IS_COPY_DOCKER_DIRECTORY }} + run: cp -r /docker/api/docker ./ + + - name: Copy dockerfile + if: ${{ inputs.IS_COPY_DOCKERFILE }} + run: cp /docker/api/Dockerfile ./ + - name: Login to Amazon ECR if: ${{ inputs.ECR_PUSH_ENABLED }} id: login-ecr