From 32e63c7aeb349b7d1d5edded251d68ae852e7006 Mon Sep 17 00:00:00 2001 From: Corey Baker Date: Mon, 22 Jan 2024 13:26:59 -0800 Subject: [PATCH 1/6] fix: Create docker containers on docker hub on release --- .github/workflows/release-automated.yml | 16 ++++++++-------- .github/workflows/release-manual-docker.yml | 14 +++++++------- Dockerfile | 4 ++-- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/release-automated.yml b/.github/workflows/release-automated.yml index 271d4abca3..0d24243639 100644 --- a/.github/workflows/release-automated.yml +++ b/.github/workflows/release-automated.yml @@ -42,7 +42,7 @@ jobs: env: REGISTRY: docker.io IMAGE_NAME: parseplatform/parse-server - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 permissions: contents: read packages: write @@ -51,23 +51,23 @@ jobs: id: branch run: echo "::set-output name=branch_name::${GITHUB_REF#refs/*/}" - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: ref: ${{ needs.release.outputs.current_tag }} - name: Set up QEMU id: qemu - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v2 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v2 - name: Log into Docker Hub if: github.event_name != 'pull_request' - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Extract Docker metadata id: meta - uses: docker/metadata-action@v3 + uses: docker/metadata-action@v4 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} flavor: | @@ -75,7 +75,7 @@ jobs: tags: | type=semver,pattern={{version}},value=${{ needs.release.outputs.current_tag }} - name: Build and push Docker image - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v3 with: context: . platforms: linux/amd64, linux/arm/v6, linux/arm/v7, linux/arm64/v8 @@ -112,4 +112,4 @@ jobs: uses: peaceiris/actions-gh-pages@v3.7.3 with: github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./docs \ No newline at end of file + publish_dir: ./docs diff --git a/.github/workflows/release-manual-docker.yml b/.github/workflows/release-manual-docker.yml index 1d19189c3a..ea244df7f9 100644 --- a/.github/workflows/release-manual-docker.yml +++ b/.github/workflows/release-manual-docker.yml @@ -14,7 +14,7 @@ env: IMAGE_NAME: parseplatform/parse-server jobs: build: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 permissions: contents: read packages: write @@ -23,23 +23,23 @@ jobs: id: branch run: echo "::set-output name=branch_name::${GITHUB_REF#refs/*/}" - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: ref: ${{ github.event.inputs.ref }} - name: Set up QEMU id: qemu - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v2 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v2 - name: Log into Docker Hub if: github.event_name != 'pull_request' - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Extract Docker metadata id: meta - uses: docker/metadata-action@v3 + uses: docker/metadata-action@v4 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} flavor: | @@ -48,7 +48,7 @@ jobs: type=semver,enable=true,pattern={{version}},value=${{ github.event.inputs.ref }} type=raw,enable=${{ github.event.inputs.ref == '' }},value=latest - name: Build and push Docker image - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v3 with: context: . platforms: linux/amd64, linux/arm/v6, linux/arm/v7, linux/arm64/v8 diff --git a/Dockerfile b/Dockerfile index 413a9bd279..3cb4e2530c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ ############################################################ # Build stage ############################################################ -FROM node:lts-alpine AS build +FROM node:18-alpine AS build RUN apk --no-cache add git WORKDIR /tmp @@ -24,7 +24,7 @@ RUN npm ci --omit=dev --ignore-scripts \ ############################################################ # Release stage ############################################################ -FROM node:lts-alpine AS release +FROM node:18-alpine AS release VOLUME /parse-server/cloud /parse-server/config From 45e4cd52f0b52ab99c7b531e039db2eb52801baa Mon Sep 17 00:00:00 2001 From: Corey Date: Mon, 22 Jan 2024 14:16:47 -0800 Subject: [PATCH 2/6] Update ci.yml Signed-off-by: Corey --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ff7e0979d8..03302fab4d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -117,17 +117,17 @@ jobs: check-docker: name: Docker Build timeout-minutes: 15 - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - name: Checkout repository uses: actions/checkout@v2 - name: Set up QEMU id: qemu - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v2 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v2 - name: Build docker image - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v3 with: context: . platforms: linux/amd64 From 02640195b38667b6c9b22b1339055facef23fb6d Mon Sep 17 00:00:00 2001 From: Corey Date: Mon, 22 Jan 2024 14:20:30 -0800 Subject: [PATCH 3/6] Update ci.yml Signed-off-by: Corey --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 03302fab4d..03a5570241 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -116,7 +116,7 @@ jobs: - run: npm run madge:circular check-docker: name: Docker Build - timeout-minutes: 15 + timeout-minutes: 20 runs-on: ubuntu-20.04 steps: - name: Checkout repository @@ -130,7 +130,7 @@ jobs: uses: docker/build-push-action@v3 with: context: . - platforms: linux/amd64 + platforms: linux/amd64, linux/arm64/v8 check-lock-file-version: name: NPM Lock File Version timeout-minutes: 5 From ec713e8b4bc82a5e07220c856eacc6fb842b0424 Mon Sep 17 00:00:00 2001 From: Corey Date: Mon, 22 Jan 2024 14:31:08 -0800 Subject: [PATCH 4/6] revert time for docker back to 15 Signed-off-by: Corey --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 03a5570241..20b073e1a6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -116,7 +116,7 @@ jobs: - run: npm run madge:circular check-docker: name: Docker Build - timeout-minutes: 20 + timeout-minutes: 15 runs-on: ubuntu-20.04 steps: - name: Checkout repository From 67b9ca7c77de41194b9a68da99f4efcbbf4833f8 Mon Sep 17 00:00:00 2001 From: Corey Date: Wed, 24 Jan 2024 09:49:51 -0800 Subject: [PATCH 5/6] revert checkout Signed-off-by: Corey --- .github/workflows/release-manual-docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-manual-docker.yml b/.github/workflows/release-manual-docker.yml index ea244df7f9..41568d997d 100644 --- a/.github/workflows/release-manual-docker.yml +++ b/.github/workflows/release-manual-docker.yml @@ -23,7 +23,7 @@ jobs: id: branch run: echo "::set-output name=branch_name::${GITHUB_REF#refs/*/}" - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v2 with: ref: ${{ github.event.inputs.ref }} - name: Set up QEMU From 5145bf5d97691ae81c296701564201105ea9bba0 Mon Sep 17 00:00:00 2001 From: Corey Date: Wed, 24 Jan 2024 09:51:08 -0800 Subject: [PATCH 6/6] revert checkout Signed-off-by: Corey --- .github/workflows/release-automated.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-automated.yml b/.github/workflows/release-automated.yml index 0d24243639..568a261c51 100644 --- a/.github/workflows/release-automated.yml +++ b/.github/workflows/release-automated.yml @@ -51,7 +51,7 @@ jobs: id: branch run: echo "::set-output name=branch_name::${GITHUB_REF#refs/*/}" - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v2 with: ref: ${{ needs.release.outputs.current_tag }} - name: Set up QEMU