From 3598662b8ef10c23b7b7c58a2dc462339a486d7f Mon Sep 17 00:00:00 2001 From: Augustin Chassine Date: Mon, 11 Sep 2023 21:14:15 +0200 Subject: [PATCH] chore: setup CI --- .github/workflows/build.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..0e9b071 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,29 @@ +name: Build and test + +on: + workflow_dispatch: + push: + +jobs: + build-base-image: + runs-on: ubuntu-latest + + steps: + - run: | + echo "TAG=test" >> $GITHUB_ENV + - name: Config tag for main + if: ${{ github.ref == 'refs/heads/main' }} + run: | + echo "TAG=stable" >> $GITHUB_ENV + - name: Config tag for dev + if: ${{ github.ref == 'refs/heads/dev' }} + run: | + echo "TAG=latest" >> $GITHUB_ENV + + - uses: actions/checkout@v3 + + - uses: actions/setup-node@v3 + with: + node-version: '18' + - run: npm ci + - run: npm run test