From 5d7c774b6f0da3ca165043e06e7c69587a98a87e Mon Sep 17 00:00:00 2001 From: William Wong Date: Tue, 5 Dec 2023 15:17:50 -0800 Subject: [PATCH] Add PR validation --- .github/workflows/pull-request-validation.yml | 101 ++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 .github/workflows/pull-request-validation.yml diff --git a/.github/workflows/pull-request-validation.yml b/.github/workflows/pull-request-validation.yml new file mode 100644 index 0000000000..065dba356a --- /dev/null +++ b/.github/workflows/pull-request-validation.yml @@ -0,0 +1,101 @@ +name: Pull request validation + +on: + pull_request: + branches: + - main + + paths-ignore: + - .github + - .vscode + + push: + branches: + - feat-github-workflow + + workflow_dispatch: {} + +defaults: + run: + shell: bash + +env: + node-version: 20.x + skip-secure-feed: true # TODO: Turn this off. + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Use Node.js ${{ env.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ env.node-version }} + cache: npm + + - if: "env.skip-secure-feed != 'true'" + name: Enable secure feed + run: npx https://aka.ms/EnableSecureFeed + + - run: npm clean-install + + - run: npm run bootstrap + + - run: npm run build --if-present + + - name: Pack docker.zip + run: zip -r docker.zip . -x .git + + # - name: Pack ./__tests__ + # run: | + # echo <