Improve security on templates. #99
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Node.js CI | |
on: | |
push: | |
branches: | |
- '*' | |
paths: [ 'nodejs/**' ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./nodejs/serverless-microservices-functionapp-triparchiver | |
strategy: | |
matrix: | |
# https://docs.microsoft.com/en-us/azure/azure-functions/functions-versions?tabs=csharp%2Cv4#languages | |
node-version: [14.x, 12.x, 10.x] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'npm' | |
cache-dependency-path: ./nodejs/serverless-microservices-functionapp-triparchiver | |
- run: npm install | |
- run: npm run pack | |
arm64_job: | |
name: Build and Test for arm64 | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up QEMU | |
id: qemu | |
uses: docker/setup-qemu-action@v1 | |
- name: Install and Run tests | |
run: | | |
docker run --rm -v ${{ github.workspace }}:/ws:rw --workdir=/ws \ | |
arm64v8/ubuntu:20.04 \ | |
bash -exc 'apt-get update && \ | |
apt install sudo -y && \ | |
sudo apt clean && \ | |
sudo apt update && \ | |
sudo apt install --fix-missing && \ | |
sudo apt update --fix-missing && \ | |
sudo apt install curl -y && \ | |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash && \ | |
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || | |
printf %s "${XDG_CONFIG_HOME}/nvm")" && \ | |
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \ | |
nvm install node && \ | |
node --version && \ | |
npm --version && \ | |
cd nodejs/serverless-microservices-functionapp-triparchiver && \ | |
npm install && \ | |
npm run pack' |