Skip to content

Bump word-wrap from 1.2.3 to 1.2.4 in /resident-ui #22

Bump word-wrap from 1.2.3 to 1.2.4 in /resident-ui

Bump word-wrap from 1.2.3 to 1.2.4 in /resident-ui #22

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: Build npm
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master, 1.0.* ]
pull_request:
branches: [ master, 1.0.* ]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build-resident-ui:
runs-on: ubuntu-latest
env:
NAMESPACE: ${{ secrets. dev_namespace_docker_hub }}
SERVICE_NAME: resident-ui
SERVICE_LOCATION: resident-ui
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- name: npm install
run: cd ${{ env.SERVICE_LOCATION }} && npm install --ignore-scripts
- name: npm build
run: cd ${{ env.SERVICE_LOCATION }} && npm run-script build -- --prod --base-href . --output-path=dist
- name: setup environment
run: |
# Strip git ref prefix from version
echo "::set-env name=BRANCH_NAME::$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')"
echo ${{ env.BRANCH_NAME }}
- name: Build image
run: |
cd "./${{env.SERVICE_LOCATION}}"
docker build . --file Dockerfile --tag ${{ env.SERVICE_NAME }}
- name: Log into registry
run: echo "${{ secrets.release_docker_hub }}" | docker login -u ${{ secrets.actor_docker_hub }} --password-stdin
- name: Push image
run: |
IMAGE_ID=$NAMESPACE/$SERVICE_NAME
# Change all uppercase to lowercase
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
VERSION=$BRANCH_NAME
echo "push version $VERSION"
echo IMAGE_ID=$IMAGE_ID
echo VERSION=$VERSION
docker tag $SERVICE_NAME $IMAGE_ID:$VERSION
docker push $IMAGE_ID:$VERSION