Skip to content

Commit

Permalink
Add a custom davinci branch in build-push-image GH Action (#16)
Browse files Browse the repository at this point in the history
* Add a custom davinci branch in build-push-image GH Action

* Add changeset
  • Loading branch information
dmaklygin authored Jun 27, 2022
1 parent d5ca357 commit 7e50715
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 7 deletions.
5 changes: 5 additions & 0 deletions .changeset/swift-seas-happen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'davinci-github-actions': minor
---

- Add ability to specify a custom davinci branch in build-push-image GH Action
15 changes: 8 additions & 7 deletions build-push-image/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +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<<br/>`temploy`,<br/>`staging`,<br/>`production`,<br/>> | | 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 |
| 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<<br/>`temploy`,<br/>`staging`,<br/>`production`,<br/>> | | 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 | | | Custom davinci branch |

### Outputs

Expand Down
5 changes: 5 additions & 0 deletions build-push-image/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ inputs:
description: 'pathname to Docker file'
required: false
default: ./davinci/packages/ci/src/configs/docker/Dockerfile
davinci-branch:
description: 'Custom davinci branch'
required: false
default: 'master'

runs:
using: composite
Expand All @@ -34,6 +38,7 @@ runs:
repository: toptal/davinci
token: ${{ env.GITHUB_TOKEN }}
path: davinci
ref: ${{ inputs.davinci-branch }}

- name: Setup node
uses: actions/[email protected]
Expand Down

0 comments on commit 7e50715

Please sign in to comment.