Skip to content

Commit

Permalink
Update workflows to use node 20
Browse files Browse the repository at this point in the history
  • Loading branch information
kilemensi committed Jun 4, 2024
1 parent e8253fc commit d81b153
Show file tree
Hide file tree
Showing 10 changed files with 60 additions and 60 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/charterafrica-deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,33 +24,33 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [18]
node-version: [20.14]
os: [ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3

- name: Cache Docker layers
uses: actions/cache@v3
uses: actions/cache@v4
with:
key: ${{ runner.os }}-buildx-${{ github.sha }}
path: /tmp/.buildx-cache
restore-keys: |
${{ runner.os }}-buildx-
- name: Login to DockerHub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
username: ${{ secrets.DOCKER_HUB_USERNAME }}

- name: Build Docker image
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
with:
build-args: |
MONGO_URL=${{ secrets.CHARTERAFRICA_MONGO_URL }}
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/charterafrica-deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [18]
node-version: [20.14]
os: [ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

# Set up Node since it's required by version-check
# https://github.com/EndBug/version-check#github-workflow
- name: Setup Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

Expand All @@ -53,15 +53,15 @@ jobs:
# https://github.com/docker/setup-qemu-action
- name: Setup up QEMU
if: steps.version-check.outputs.changed == 'true'
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
if: steps.version-check.outputs.changed == 'true'
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3

- name: Cache Docker layers
if: steps.version-check.outputs.changed == 'true'
uses: actions/cache@v3
uses: actions/cache@v4
with:
key: ${{ runner.os }}-buildx-${{ github.sha }}
path: /tmp/.buildx-cache
Expand All @@ -70,14 +70,14 @@ jobs:
- name: Login to DockerHub
if: steps.version-check.outputs.changed == 'true'
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
username: ${{ secrets.DOCKER_HUB_USERNAME }}

- name: Build Docker image
if: steps.version-check.outputs.changed == 'true'
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
with:
build-args: |
MONGO_URL=${{ secrets.CHARTERAFRICA_MONGO_URL }}
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@ jobs:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
strategy:
matrix:
node-version: [18]
node-version: [20.14]
os: [ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 2

# https://github.com/pnpm/action-setup#use-cache-to-reduce-installation-time
- name: Install pnpm
uses: pnpm/action-setup@v2
uses: pnpm/action-setup@v4
id: pnpm-install
with:
version: 8
Expand All @@ -48,7 +48,7 @@ jobs:
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- name: Setup pnpm cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
Expand All @@ -58,7 +58,7 @@ jobs:
# Looks like to use pnpm cache, setup-node must run after pnpm/action-setup
# https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#caching-packages-data
- name: Install Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "pnpm"
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/codeforafrica-deploy-dev-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,33 +25,33 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [18]
node-version: [20.14]
os: [ubuntu-latest]
steps:
- name: Cloning repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3

- name: Cache Docker layers
uses: actions/cache@v3
uses: actions/cache@v4
with:
key: ${{ runner.os }}-buildx-${{ github.sha }}
path: /tmp/.buildx-cache
restore-keys: |
${{ runner.os }}-buildx-
- name: Login to DockerHub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
username: ${{ secrets.DOCKER_HUB_USERNAME }}

- name: Build Docker image
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
with:
build-args: |
MONGODB_URL=${{ secrets.CODEFORAFRICA_MONGO_URL }}/${{ env.APP_NAME }}
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/codeforafrica-deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,18 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [18]
node-version: [20.14]
os: [ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

# Set up Node since it's required by version-check
# https://github.com/EndBug/version-check#github-workflow
- name: Setup Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

Expand All @@ -52,11 +52,11 @@ jobs:

- name: Set up Docker Buildx
if: steps.version-check.outputs.changed == 'true'
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3

- name: Cache Docker layers
if: steps.version-check.outputs.changed == 'true'
uses: actions/cache@v3
uses: actions/cache@v4
with:
key: ${{ runner.os }}-buildx-${{ github.sha }}
path: /tmp/.buildx-cache
Expand All @@ -65,14 +65,14 @@ jobs:
- name: Login to DockerHub
if: steps.version-check.outputs.changed == 'true'
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
username: ${{ secrets.DOCKER_HUB_USERNAME }}

- name: Build Docker image
if: steps.version-check.outputs.changed == 'true'
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
with:
build-args: |
MONGODB_URL=${{ secrets.CODEFORAFRICA_MONGODB_URL }}
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/codeforafrica-deploy-review-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,34 +24,34 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [18]
node-version: [20.14]
os: [ubuntu-latest]
if: github.event_name == 'pull_request' && github.event.action != 'closed'
steps:
- name: Cloning repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3

- name: Cache Docker layers
uses: actions/cache@v3
uses: actions/cache@v4
with:
key: ${{ runner.os }}-buildx-${{ github.sha }}
path: /tmp/.buildx-cache
restore-keys: |
${{ runner.os }}-buildx-
- name: Login to DockerHub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
username: ${{ secrets.DOCKER_HUB_USERNAME }}

- name: Build Docker image
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
with:
build-args: |
MONGODB_URL=${{ secrets.CODEFORAFRICA_MONGO_URL }}/${{ env.APP_NAME }}
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/dependabot_lint_format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [18]
node-version: [20.14]
os: [ubuntu-latest]
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}

# https://github.com/pnpm/action-setup#use-cache-to-reduce-installation-time
- name: Install pnpm
uses: pnpm/action-setup@v2
uses: pnpm/action-setup@v4
id: pnpm-install
with:
version: 8
Expand All @@ -37,7 +37,7 @@ jobs:
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- name: Setup pnpm cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
Expand All @@ -47,7 +47,7 @@ jobs:
# Looks like to use pnpm cache, setup-node must run after pnpm/action-setup
# https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#caching-packages-data
- name: Install Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "pnpm"
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/pesayetu-deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,33 +25,33 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [18]
node-version: [20.14]
os: [ubuntu-latest]
steps:
- name: Cloning repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3

- name: Cache Docker layers
uses: actions/cache@v3
uses: actions/cache@v4
with:
key: ${{ runner.os }}-buildx-${{ github.sha }}
path: /tmp/.buildx-cache
restore-keys: |
${{ runner.os }}-buildx-
- name: Login to DockerHub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
username: ${{ secrets.DOCKER_HUB_USERNAME }}

- name: Build Docker image
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
with:
build-args: |
WORDPRESS_URL=${{ secrets.PESAYETU_WORDPRESS_URL }}
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/release-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [18]
node-version: [20.14]
os: [ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 2

# https://github.com/pnpm/action-setup#use-cache-to-reduce-installation-time
- name: Install pnpm
uses: pnpm/action-setup@v2
uses: pnpm/action-setup@v4
id: pnpm-install
with:
version: 8
Expand All @@ -38,7 +38,7 @@ jobs:
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- name: Setup pnpm cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
Expand All @@ -48,7 +48,7 @@ jobs:
# Looks like to use pnpm cache, setup-node must run after pnpm/action-setup
# https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#caching-packages-data
- name: Install Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "pnpm"
Expand Down
Loading

0 comments on commit d81b153

Please sign in to comment.