From 7922f97ea827a044e2b07c92ed474458648fde95 Mon Sep 17 00:00:00 2001 From: Ng Wei En Date: Thu, 4 Jan 2024 22:16:58 +0800 Subject: [PATCH] build: update workflows for node v18 --- .github/workflows/deploy-lambda.yml | 14 +++++++------- .github/workflows/prettier.yml | 6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/deploy-lambda.yml b/.github/workflows/deploy-lambda.yml index 2835d51e..c6c33abd 100644 --- a/.github/workflows/deploy-lambda.yml +++ b/.github/workflows/deploy-lambda.yml @@ -21,19 +21,19 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [16.x] + node-version: [18.x] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Cache Node modules - uses: actions/cache@v1 + uses: actions/cache@v3 with: path: ~/.npm key: ${{ runner.os }}-node-lambda-${{ hashFiles('**/package-lock.json') }} restore-keys: | ${{ runner.os }}-node-lambda- - name: Setup Node - uses: actions/setup-node@v1 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} - run: export VERSION_AIRTABLE=`node -p -e "require('./package-lock.json').packages['node_modules/airtable'].version"` @@ -46,7 +46,7 @@ jobs: - run: cp -r node_modules/ lambda/ - name: Upload build - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: mentorship-page-lambda-${{ github.sha }} path: lambda/ @@ -56,14 +56,14 @@ jobs: if: github.event_name == 'push' && github.ref == 'refs/heads/master' runs-on: ubuntu-latest steps: - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v4 with: name: mentorship-page-lambda-${{ github.sha }} path: lambda/ - run: cd lambda && zip -r ../lambda.zip . - name: Deploy lambda - uses: appleboy/lambda-action@v0.1.5 + uses: appleboy/lambda-action@v0.1.9 with: aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} diff --git a/.github/workflows/prettier.yml b/.github/workflows/prettier.yml index d04e4311..e816807f 100644 --- a/.github/workflows/prettier.yml +++ b/.github/workflows/prettier.yml @@ -7,9 +7,9 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [16.x] + node-version: [18.x] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Cache Node modules uses: actions/cache@v1 @@ -19,7 +19,7 @@ jobs: restore-keys: | ${{ runner.os }}-node- - name: Setup Node - uses: actions/setup-node@v1 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }}