Fixing the yml file for Github Action (#171)

This commit is contained in:
Arpit Mohan 2020-07-27 12:31:00 +05:30 committed by GitHub
parent 74756a25b1
commit f120fb1281
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -37,28 +37,28 @@ jobs:
${{ runner.OS }}- ${{ runner.OS }}-
# Install all the dependencies # Install all the dependencies
- name: Install dependencies - name: Install dependencies
run: yarn install run: yarn install
- name: Set the build environment based on the branch - name: Set the build environment based on the branch
id: vars id: vars
run: | run: |
REACT_APP_ENVIRONMENT="PRODUCTION" REACT_APP_ENVIRONMENT="PRODUCTION"
echo ::set-output name=REACT_APP_ENVIRONMENT::${REACT_APP_ENVIRONMENT} echo ::set-output name=REACT_APP_ENVIRONMENT::${REACT_APP_ENVIRONMENT}
- name: Create the bundle - name: Create the bundle
run: REACT_APP_ENVIRONMENT=${{steps.vars.outputs.REACT_APP_ENVIRONMENT}} yarn build run: REACT_APP_ENVIRONMENT=${{steps.vars.outputs.REACT_APP_ENVIRONMENT}} yarn build
- name: Get the version - name: Get the version
id: get_version id: get_version
run: echo ::set-output name=tag::${GITHUB_REF#refs/tags/} run: echo ::set-output name=tag::${GITHUB_REF#refs/tags/}
# Build Docker image and push to Docker Hub # Build Docker image and push to Docker Hub
- name: Push production image to Docker Hub with commit tag - name: Push production image to Docker Hub with commit tag
run: | run: |
docker build -t appsmith/appsmith-editor:${{steps.get_version.outputs.tag}} . docker build -t appsmith/appsmith-editor:${{steps.get_version.outputs.tag}} .
echo ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | docker login -u ${{ secrets.DOCKER_HUB_USERNAME }} --password-stdin echo ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | docker login -u ${{ secrets.DOCKER_HUB_USERNAME }} --password-stdin
docker push appsmith/appsmith-editor docker push appsmith/appsmith-editor
build-server: build-server:
runs-on: ubuntu-latest runs-on: ubuntu-latest