From fa2414aefd036b403ff54ba9b3171e677c12dc76 Mon Sep 17 00:00:00 2001 From: Aleksandr Shumilov Date: Thu, 12 Oct 2023 14:00:32 +0200 Subject: [PATCH 1/2] fix: make docker-file mandatory --- build-push-image/README.md | 16 ++++++++-------- build-push-image/action.yml | 9 ++++----- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/build-push-image/README.md b/build-push-image/README.md index 904ebb6d..e82b9e68 100644 --- a/build-push-image/README.md +++ b/build-push-image/README.md @@ -12,14 +12,14 @@ This GH Action builds a Docker image and pushes to google cloud. The list of arguments, that are used in GH Action: -| name | type | required | default | description | -| ---------------- | ----------------------------------------------------------- | -------- | --------------------------------------------------- | ------------------------------------------------------------------------------------------ | -| `sha` | string | ✅ | | Commit hash that will be used as a tag for the Docker image | -| `image-name` | string | ✅ | | Name of the Docker image. Might be used in the next steps (for ex.: deploy a Docker image) | -| `environment` | enum<
`temploy`,
`staging`,
`production`,
> | | staging | Determines additional procedures while creating a Docker image. | -| `build-args` | string | ✅ | | Multiline string to describe build arguments that will be used during dockerization | -| `docker-file` | string | | ./davinci/packages/ci/src/configs/docker/Dockerfile | pathname to Docker file | -| `davinci-branch` | string | | master | Custom davinci branch | +| name | type | required | default | description | +| ---------------- | ----------------------------------------------------------- | -------- | ------- | ------------------------------------------------------------------------------------------ | +| `sha` | string | ✅ | | Commit hash that will be used as a tag for the Docker image | +| `image-name` | string | ✅ | | Name of the Docker image. Might be used in the next steps (for ex.: deploy a Docker image) | +| `build-args` | string | ✅ | | Multiline string to describe build arguments that will be used during dockerization | +| `docker-file` | string | ✅ | | pathname to Docker file | +| `environment` | enum<
`temploy`,
`staging`,
`production`,
> | | staging | Determines additional procedures while creating a Docker image. | +| `davinci-branch` | string | | master | Custom davinci branch | ### Outputs diff --git a/build-push-image/action.yml b/build-push-image/action.yml index 52bf5da3..785932bd 100644 --- a/build-push-image/action.yml +++ b/build-push-image/action.yml @@ -13,17 +13,16 @@ inputs: image-name: required: true description: 'Name of the Docker image. Might be used in the next steps (for ex.: deploy a Docker image)' - environment: - required: false - default: staging - description: 'Determines additional procedures while creating a Docker image. || enum<
`temploy`,
`staging`,
`production`,
>' build-args: required: true description: 'Multiline string to describe build arguments that will be used during dockerization' docker-file: description: 'pathname to Docker file' + required: true + environment: required: false - default: ./davinci/packages/ci/src/configs/docker/Dockerfile + default: staging + description: 'Determines additional procedures while creating a Docker image. || enum<
`temploy`,
`staging`,
`production`,
>' davinci-branch: description: 'Custom davinci branch' required: false From c70148173026e3351288c51332f69d6f40279529 Mon Sep 17 00:00:00 2001 From: Aleksandr Shumilov Date: Thu, 12 Oct 2023 14:05:41 +0200 Subject: [PATCH 2/2] fix: change default value --- .changeset/spicy-ears-share.md | 5 +++++ build-push-image/README.md | 16 ++++++++-------- build-push-image/action.yml | 9 +++++---- 3 files changed, 18 insertions(+), 12 deletions(-) create mode 100644 .changeset/spicy-ears-share.md diff --git a/.changeset/spicy-ears-share.md b/.changeset/spicy-ears-share.md new file mode 100644 index 00000000..df9b0166 --- /dev/null +++ b/.changeset/spicy-ears-share.md @@ -0,0 +1,5 @@ +--- +'davinci-github-actions': major +--- + +- change default value of `docker-file` parameter in `davinci-github-actions/build-push-image` action diff --git a/build-push-image/README.md b/build-push-image/README.md index e82b9e68..076d4ecb 100644 --- a/build-push-image/README.md +++ b/build-push-image/README.md @@ -12,14 +12,14 @@ This GH Action builds a Docker image and pushes to google cloud. The list of arguments, that are used in GH Action: -| name | type | required | default | description | -| ---------------- | ----------------------------------------------------------- | -------- | ------- | ------------------------------------------------------------------------------------------ | -| `sha` | string | ✅ | | Commit hash that will be used as a tag for the Docker image | -| `image-name` | string | ✅ | | Name of the Docker image. Might be used in the next steps (for ex.: deploy a Docker image) | -| `build-args` | string | ✅ | | Multiline string to describe build arguments that will be used during dockerization | -| `docker-file` | string | ✅ | | pathname to Docker file | -| `environment` | enum<
`temploy`,
`staging`,
`production`,
> | | staging | Determines additional procedures while creating a Docker image. | -| `davinci-branch` | string | | master | Custom davinci branch | +| name | type | required | default | description | +| ---------------- | ----------------------------------------------------------- | -------- | -------------------------------------------------------------- | ------------------------------------------------------------------------------------------ | +| `sha` | string | ✅ | | Commit hash that will be used as a tag for the Docker image | +| `image-name` | string | ✅ | | Name of the Docker image. Might be used in the next steps (for ex.: deploy a Docker image) | +| `environment` | enum<
`temploy`,
`staging`,
`production`,
> | | staging | Determines additional procedures while creating a Docker image. | +| `build-args` | string | ✅ | | Multiline string to describe build arguments that will be used during dockerization | +| `docker-file` | string | | ./davinci/packages/ci/src/configs/docker/Dockerfile.gha-deploy | pathname to Docker file | +| `davinci-branch` | string | | master | Custom davinci branch | ### Outputs diff --git a/build-push-image/action.yml b/build-push-image/action.yml index 785932bd..4e68433f 100644 --- a/build-push-image/action.yml +++ b/build-push-image/action.yml @@ -13,16 +13,17 @@ inputs: image-name: required: true description: 'Name of the Docker image. Might be used in the next steps (for ex.: deploy a Docker image)' + environment: + required: false + default: staging + description: 'Determines additional procedures while creating a Docker image. || enum<
`temploy`,
`staging`,
`production`,
>' build-args: required: true description: 'Multiline string to describe build arguments that will be used during dockerization' docker-file: description: 'pathname to Docker file' - required: true - environment: required: false - default: staging - description: 'Determines additional procedures while creating a Docker image. || enum<
`temploy`,
`staging`,
`production`,
>' + default: ./davinci/packages/ci/src/configs/docker/Dockerfile.gha-deploy davinci-branch: description: 'Custom davinci branch' required: false