From 206ecb0811e752e112de3deb7bdddfaf622e3f62 Mon Sep 17 00:00:00 2001 From: Aleksandr Shumilov Date: Wed, 6 Nov 2024 16:49:38 +0000 Subject: [PATCH] [FX-NULL] Add parameter to build-push-release-image (#359) --- .changeset/nervous-oranges-obey.md | 5 +++++ build-push-release-image/README.md | 17 +++++++++-------- build-push-release-image/action.yml | 6 +++++- 3 files changed, 19 insertions(+), 9 deletions(-) create mode 100644 .changeset/nervous-oranges-obey.md diff --git a/.changeset/nervous-oranges-obey.md b/.changeset/nervous-oranges-obey.md new file mode 100644 index 00000000..866e4794 --- /dev/null +++ b/.changeset/nervous-oranges-obey.md @@ -0,0 +1,5 @@ +--- +'davinci-github-actions': minor +--- + +- add `gh-runner-driver-opts` parameter to `build-push-release-image` action diff --git a/build-push-release-image/README.md b/build-push-release-image/README.md index 7af0221d..6a3e4d6d 100644 --- a/build-push-release-image/README.md +++ b/build-push-release-image/README.md @@ -10,14 +10,15 @@ This GH Action builds a Docker [release image](https://github.com/toptal/davinci 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 | -| `repository-name` | string | ✅ | | Name of repository. It's used to determine an image name | -| `environment` | enum<
`temploy`,
`staging`,
`production`,
> | | staging | Used to determine additional procedures while creating a Docker image | -| `dist-folder` | string | | ./dist | Path to the folder with the built project | -| `scope` | string | | | Used to determine the scope of the built project. Usefull in multihost monorepo projects to build only one project. | -| `node-version` | string | | 20 | Node.js version used. The action is guaranteed to work only with Node.js@20 (default value) | +| name | type | required | default | description | +| ----------------------- | ----------------------------------------------------------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------- | +| `sha` | string | ✅ | | Commit hash that will be used as a tag for the Docker image | +| `repository-name` | string | ✅ | | Name of repository. It's used to determine an image name | +| `environment` | enum<
`temploy`,
`staging`,
`production`,
> | | staging | Used to determine additional procedures while creating a Docker image | +| `dist-folder` | string | | ./dist | Path to the folder with the built project | +| `scope` | string | | | Used to determine the scope of the built project. Usefull in multihost monorepo projects to build only one project. | +| `node-version` | string | | 20 | Node.js version used. The action is guaranteed to work only with Node.js@20 (default value) | +| `gh-runner-driver-opts` | string | | | Driver options for GH Runners | ### Outputs diff --git a/build-push-release-image/action.yml b/build-push-release-image/action.yml index 8446a7d7..f00555b5 100644 --- a/build-push-release-image/action.yml +++ b/build-push-release-image/action.yml @@ -29,6 +29,9 @@ inputs: required: false default: 20 description: 'Node.js version used. The action is guaranteed to work only with Node.js@20 (default value)' + gh-runner-driver-opts: + required: false + description: 'Driver options for GH Runners' runs: using: composite @@ -46,13 +49,14 @@ runs: yarn lerna run build --scope=${{ inputs.scope}} fi - - uses: toptal/davinci-github-actions/build-push-image@v14.0.0 + - uses: toptal/davinci-github-actions/build-push-image@v15.5.0 with: sha: ${{ inputs.sha }} image-name: ${{ inputs.repository-name }}-release environment: ${{ inputs.environment }} node-version: ${{ inputs.node-version }} docker-file: ./davinci/packages/ci/src/configs/docker/Dockerfile.gha-deploy + gh-runner-driver-opts: ${{ inputs.gh-runner-driver-opts }} build-args: | ENV_RUNTIME_ENTRYPOINT=./davinci/packages/ci/src/configs/docker/env-runtime.entrypoint.sh DIST_FOLDER=${{ inputs.dist-folder }}