Adding the step to add the release tag based on the branch in the client Docker image
This commit is contained in:
parent
e2f3ab538b
commit
9c6b2967de
12
.github/workflows/client.yml
vendored
12
.github/workflows/client.yml
vendored
|
|
@ -62,9 +62,15 @@ jobs:
|
|||
|
||||
- name: Run the jest tests
|
||||
run: REACT_APP_ENVIRONMENT=${{steps.vars.outputs.REACT_APP_ENVIRONMENT}} yarn run test:unit
|
||||
|
||||
|
||||
# Here, the GITHUB_REF is of type /refs/head/<branch_name>. We extract branch_name from this by removing the
|
||||
# first 11 characters. This can be used to build images for several branches
|
||||
- name: Get the version to tag the Docker image
|
||||
id: vars
|
||||
run: echo ::set-output name=tag::$(echo ${GITHUB_REF:11})
|
||||
|
||||
# Build release Docker image and push to Docker Hub
|
||||
- name: Push release image to Docker Hub with commit tag
|
||||
- name: Push release image to Docker Hub
|
||||
if: success() && github.ref == 'refs/heads/release'
|
||||
run: |
|
||||
docker build -t appsmith/appsmith-editor:${{steps.vars.outputs.tag}} .
|
||||
|
|
@ -72,7 +78,7 @@ jobs:
|
|||
docker push appsmith/appsmith-editor
|
||||
|
||||
# Build master Docker image and push to Docker Hub
|
||||
- name: Push release image to Docker Hub with commit tag
|
||||
- name: Push production image to Docker Hub with commit tag
|
||||
if: success() && github.ref == 'refs/heads/master'
|
||||
run: |
|
||||
docker build -t appsmith/appsmith-editor:${GITHUB_SHA} .
|
||||
|
|
|
|||
|
|
@ -79,3 +79,5 @@ This section has moved here: https://facebook.github.io/create-react-app/docs/de
|
|||
### `npm run build` fails to minify
|
||||
|
||||
This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user