Skip to content

Fix typo

Fix typo #1797

---
name: build, push to registry and tests
on:
push:
branches-ignore:
- "development/**"
env:
NAMESPACE: "scality/zenko-ui/dev"
REGISTRY: "ghcr.io"
jobs:
oras:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Oras
run: |
curl -LO https://github.com/oras-project/oras/releases/download/v${ORAS_VERSION}/oras_${ORAS_VERSION}_linux_amd64.tar.gz
mkdir -p oras-install/
sudo tar -zxf oras_${ORAS_VERSION}_*.tar.gz -C /usr/local/bin oras
rm -rf oras_${ORAS_VERSION}_*.tar.gz oras-install/
env:
ORAS_VERSION: "0.12.0"
- name: Oras login
run: oras login --username "${LOGIN}" --password "${PASSWORD}" ${REGISTRY}
env:
LOGIN: "${{ github.actor }}"
PASSWORD: "${{ github.token }}"
- name: push nginx and runtime-app-configuration
run: |
oras push ${REGISTRY}/${NAMESPACE}/zenko-ui-config:${{ github.sha }} \
runtime-app-configuration.gotempl:application/zenko-ui-runtime-config-template+json \
nginx.conf.gotempl:text/nginx-conf-template
build:
runs-on: ubuntu-20.04
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v2.3.5
- uses: actions/setup-node@v2.4.1
with:
node-version: "16"
cache: "npm"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: install dependencies
run: npm config set unsafe-perm true && npm ci
- name: build assets
run: npm run build
- name: Build and push zenko ui
uses: docker/build-push-action@v2.7.0
with:
push: true
context: .
tags: |
${{env.REGISTRY}}/${{env.NAMESPACE}}:${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max
tests:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2.3.5
- uses: actions/setup-node@v2.4.1
with:
node-version: "16"
cache: "npm"
- name: install dependencies
run: npm config set unsafe-perm true && npm ci
- name: run eslint test
run: npm run test:lint
- name: run test suite
run: npm run test:coverage
- name: code coverage
uses: codecov/codecov-action@v2.1.0