From d4605a8a5b595961d75cbeafe4d3e07adc99ed83 Mon Sep 17 00:00:00 2001 From: Hugo Arregui Date: Mon, 18 Mar 2024 09:53:13 -0300 Subject: [PATCH] update CI --- .github/workflows/docker.yml | 6 +++--- .github/workflows/node.yml | 12 ++++++------ Dockerfile | 10 +++++----- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 31d81be..aaadf09 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -8,9 +8,9 @@ jobs: runs-on: ubuntu-latest steps: - name: Set up QEMU - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v3 # - # name: Login to DockerHub # uses: docker/login-action@v1 @@ -19,7 +19,7 @@ jobs: # password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build and push id: docker_build - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v5 with: # push: true tags: well-known-components/template-server:latest diff --git a/.github/workflows/node.yml b/.github/workflows/node.yml index 8a761f5..2bbd85c 100644 --- a/.github/workflows/node.yml +++ b/.github/workflows/node.yml @@ -8,14 +8,14 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@master - - name: Use Node.js 16.x + - name: Use Node.js 18.x uses: actions/setup-node@v3 with: - node-version: 16.x - cache: npm + node-version: 18.x + cache: yarn - name: install - run: npm ci + run: yarn - name: build - run: npm run build + run: yarn build - name: test - run: npm run test + run: yarn test diff --git a/Dockerfile b/Dockerfile index 81cfe82..bcfde01 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,16 +14,16 @@ RUN chmod +x /tini # install dependencies COPY package.json /app/package.json -COPY package-lock.json /app/package-lock.json -RUN npm ci +COPY yarn.lock /app/yarn.lock +RUN yarn # build the app COPY . /app -RUN npm run build -RUN npm run test +RUN yarn build +RUN yarn test # remove devDependencies, keep only used dependencies -RUN npm ci --only=production +RUN yarn install --frozen-lockfile ########################## END OF BUILD STAGE ##########################