diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 5e6e39d..4787aa1 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -1,27 +1,13 @@ -name: Docker +name: TestBuild on: + workflow_dispatch: push: - # Publish `master` as Docker `latest` image. - branches: + branches-ignore: - master - - # Publish `v1.2.3` tags as releases. - tags: - - v* - - # Run tests for any PRs. - pull_request: - -env: - IMAGE_NAME: ieee-csitss - jobs: - # Run tests. - # See also https://docs.docker.com/docker-hub/builds/automated-testing/ test: runs-on: ubuntu-latest - steps: - uses: actions/checkout@v2 @@ -29,41 +15,4 @@ jobs: run: yarn install --frozen-lockfile - name: Build - run: NODE_ENV=production yarn build - - - name: Make sure build works - run: | - docker build . --file Dockerfile.production - # Push image to GitHub Packages. - # See also https://docs.docker.com/docker-hub/builds/ - push: - # Ensure test job passes before pushing image. - needs: test - - runs-on: ubuntu-20.04 - if: github.event_name == 'push' - - steps: - - uses: actions/checkout@v2 - - - name: Build image - run: docker build . --file Dockerfile.production --tag $IMAGE_NAME - - - name: Log into registry - run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin - - - name: Push image - run: | - IMAGE_ID=ghcr.io/${{ github.repository }}/$IMAGE_NAME - # Change all uppercase to lowercase - IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') - # Strip git ref prefix from version - VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') - # Strip "v" prefix from tag name - [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') - # Use Docker `latest` tag convention - [ "$VERSION" == "master" ] && VERSION=latest - echo IMAGE_ID=$IMAGE_ID - echo VERSION=$VERSION - docker tag $IMAGE_NAME $IMAGE_ID:$VERSION - docker push $IMAGE_ID:$VERSION + run: NODE_ENV=production yarn build \ No newline at end of file diff --git a/package.json b/package.json index 8dcabf1..0db9d66 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,10 @@ "name": "Prajwal Prakash", "url": "https://www.devcoffee.me" }, + "engines": { + "npm": ">=9.0.0", + "node": ">=18.0.0" + }, "license": "MIT", "description": "PWA to interact with users for CSITSS", "scripts": { @@ -62,4 +66,4 @@ "tailwindcss": "^3.0.24", "ts-node": "^10.7.0" } -} +} \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index f6905eb..74455f8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -713,9 +713,9 @@ camelcase-css@^2.0.1: integrity sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA== caniuse-lite@^1.0.30001332, caniuse-lite@^1.0.30001335: - version "1.0.30001341" - resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001341.tgz" - integrity sha512-2SodVrFFtvGENGCv0ChVJIDQ0KPaS1cg7/qtfMaICgeMolDdo/Z2OD32F0Aq9yl6F4YFwGPBS5AaPqNYiW4PoA== + version "1.0.30001581" + resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001581.tgz" + integrity sha512-whlTkwhqV2tUmP3oYhtNfaWGYHDdS3JYFQBKXxcUR9qqPWsRhFHhoISO2Xnl/g0xyKzht9mI1LZpiNWfMzHixQ== chalk@^4.0.0, chalk@^4.1.0: version "4.1.2"