diff --git a/.github/workflows/check-be-pull-request.yml b/.github/workflows/check-be-pull-request.yml new file mode 100644 index 000000000..f17d8c5c8 --- /dev/null +++ b/.github/workflows/check-be-pull-request.yml @@ -0,0 +1,41 @@ +name: Check Backend Pull Request + +on: + pull_request: + types: [ opened, synchronize ] + paths: + - 'backend/**' + - '!backend/README.md' + - '!backend/.*' + - 'backend/.eslintrc.js' + + +jobs: + + check-be-pr: + name: Check + runs-on: ubuntu-latest + + steps: + - + name: โ˜๏ธ Checkout source + uses: actions/checkout@v3 + - + name: ๐Ÿ”ง Setup Node 16 + uses: actions/setup-node@v3 + with: + node-version: '16' + cache: 'npm' + cache-dependency-path: backend/package-lock.json + - + name: ๐Ÿ“ฆ Install dependencies + run: npm ci --only-production --ignore-scripts + working-directory: backend + # - + # name: ๐Ÿงช Run tests + # run: npm run test:ci + # working-directory: backend + - + name: ๐Ÿ—๏ธ Run build + run: npm run build + working-directory: backend diff --git a/.github/workflows/check-fe-pull-request.yml b/.github/workflows/check-fe-pull-request.yml new file mode 100644 index 000000000..b91e6f060 --- /dev/null +++ b/.github/workflows/check-fe-pull-request.yml @@ -0,0 +1,41 @@ +name: Check Frontend Pull Request + +on: + pull_request: + types: [ opened, synchronize ] + paths: + - 'frontend/**' + - '!frontend/README.md' + - '!frontend/.*' + - 'frontend/.eslintrc.js' + + +jobs: + + check-fe-pr: + name: Check + runs-on: ubuntu-latest + + steps: + - + name: โ˜๏ธ Checkout source + uses: actions/checkout@v3 + - + name: ๐Ÿ”ง Setup Node 16 + uses: actions/setup-node@v3 + with: + node-version: '16' + cache: 'npm' + cache-dependency-path: frontend/package-lock.json + - + name: ๐Ÿ“ฆ Install dependencies + run: npm ci --only-production --ignore-scripts + working-directory: frontend + # - + # name: ๐Ÿงช Run tests + # run: npm run test:ci + # working-directory: frontend + - + name: ๐Ÿ—๏ธ Run build + run: npm run build + working-directory: frontend diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 769a5f7a3..e85ddcfd5 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -11,7 +11,7 @@ jobs: steps: - name: โ˜๏ธ Checkout source - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: ๐Ÿ”ง Set up QEMU uses: docker/setup-qemu-action@v2 @@ -36,7 +36,7 @@ jobs: # run: | # docker run --rm infisical/backend:test - - name: ๐Ÿ“ฆ Build backend and push + name: ๐Ÿ—๏ธ Build backend and push uses: docker/build-push-action@v3 with: push: true @@ -52,7 +52,7 @@ jobs: steps: - name: โ˜๏ธ Checkout source - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: ๐Ÿ”ง Set up QEMU uses: docker/setup-qemu-action@v2 @@ -79,10 +79,12 @@ jobs: # run: | # docker run --rm infisical/frontend:test - - name: ๐Ÿ“ฆ Build frontend and push + name: ๐Ÿ—๏ธ Build frontend and push uses: docker/build-push-action@v3 with: push: true context: frontend tags: infisical/frontend:latest platforms: linux/amd64,linux/arm64 + build-args: | + POSTHOG_API_KEY=${{ secrets.PUBLIC_POSTHOG_API_KEY }}