Skip to content

Commit e750de2

Browse files
committed
Bump rest of workflow versions
1 parent c0eb70a commit e750de2

2 files changed

Lines changed: 26 additions & 21 deletions

File tree

.github/workflows/main.yml

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ on:
44
branches:
55
- main
66
- chore-upgrade_workflow
7+
8+
concurrency:
9+
group: "${{ github.workflow }} @ ${{ github.ref }}"
10+
cancel-in-progress: true
11+
712
env:
813
DOKKU_REMOTE_BRANCH: "master"
914
DOKKU_REMOTE_URL: "ssh://dokku@ui-2.prod.codeforafrica.org/sensors-africa-ui"
@@ -14,16 +19,14 @@ env:
1419
NEXT_PUBLIC_APP_API_STATIC_URL: "https://api.sensors.africa/static/v2"
1520
NEXT_PUBLIC_APP_MAP_URL: "https://v2.map.aq.sensors.africa"
1621

17-
1822
jobs:
1923
deploy:
20-
runs-on: ubuntu-latest
24+
strategy:
25+
matrix:
26+
node-version: [20.16]
27+
os: [ubuntu-latest]
28+
runs-on: ${{ matrix.os }}
2129
steps:
22-
- name: Cancel Previous Runs
23-
uses: styfle/cancel-workflow-action@0.9.1
24-
with:
25-
access_token: ${{ github.token }}
26-
2730
- name: Checkout
2831
uses: actions/checkout@v2
2932
with:
@@ -32,13 +35,13 @@ jobs:
3235
# Set up Node since it's required by version-check
3336
# https://github.com/EndBug/version-check#github-workflow
3437
- name: Setup Node.js
35-
uses: actions/setup-node@v2
38+
uses: actions/setup-node@v4
3639
with:
37-
node-version: "18"
40+
node-version: ${{ matrix.node-version }}
3841

3942
- name: Check if version is bumped
4043
id: version-check
41-
uses: EndBug/version-check@v1
44+
uses: EndBug/version-check@v2
4245
with:
4346
# Whether to search in every commit's diff.
4447
# This is useful if you often do change the version without saying it
@@ -47,6 +50,10 @@ jobs:
4750
# omit this.
4851
diff-search: true
4952

53+
# Add support for more platforms with QEMU (optional)
54+
- name: Set up QEMU
55+
uses: docker/setup-qemu-action@v3
56+
5057
- name: Set up Docker Buildx
5158
# if: steps.version-check.outputs.changed == 'true'
5259
if: true
@@ -55,7 +62,7 @@ jobs:
5562
- name: Cache Docker layers
5663
# if: steps.version-check.outputs.changed == 'true'
5764
if: true
58-
uses: actions/cache@v3
65+
uses: actions/cache@v4
5966
with:
6067
key: ${{ runner.os }}-buildx-${{ github.sha }}
6168
path: /tmp/.buildx-cache
@@ -65,15 +72,15 @@ jobs:
6572
- name: Login to DockerHub
6673
# if: steps.version-check.outputs.changed == 'true'
6774
if: true
68-
uses: docker/login-action@v1
75+
uses: docker/login-action@v3
6976
with:
7077
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
7178
username: ${{ secrets.DOCKER_HUB_USERNAME }}
7279

7380
- name: Build Docker image
7481
# if: steps.version-check.outputs.changed == 'true'
7582
if: true
76-
uses: docker/build-push-action@v2
83+
uses: docker/build-push-action@v6
7784
with:
7885
build-args: |
7986
NEXT_PUBLIC_APP_API_BASE_URL: ${{ env.NEXT_PUBLIC_APP_API_BASE_URL }}
@@ -83,6 +90,7 @@ jobs:
8390
cache-from: type=local,src=/tmp/.buildx-cache
8491
cache-to: type=local,dest=/tmp/.buildx-cache-new
8592
context: .
93+
platforms: linux/arm64
8694
push: true
8795
# tags: "${{ env.IMAGE_NAME }}:${{ steps.version-check.outputs.version }}"
8896
tags: "${{ env.IMAGE_NAME }}:0.4.29"

Dockerfile

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,8 @@
1-
ARG \
2-
NODE_ENV=production \
3-
# Next.js collects completely anonymous telemetry data about general usage.
4-
# Learn more here: https://nextjs.org/telemetry
5-
NEXT_TELEMETRY_DISABLED=1
6-
71
# ============================================================================
82
# Node
93
# ============================================================================
104

11-
FROM node:20.14-alpine AS node
5+
FROM node:20.19-alpine AS node
126

137
# Always install security updated e.g. https://pythonspeed.com/articles/security-updates-in-docker/
148
# Update local cache so that other stages don't need to update cache
@@ -38,6 +32,8 @@ ARG \
3832
NEXT_PUBLIC_APP_API_DOCS_URL="https://localhost:8000/docs" \
3933
NEXT_PUBLIC_APP_API_STATIC_URL="http://localhost:8000/static/v2" \
4034
NEXT_PUBLIC_APP_MAP_URL="https://v2.map.aq.sensors.africa/" \
35+
# Next.js collects completely anonymous telemetry data about general usage.
36+
# Learn more here: https://nextjs.org/telemetry
4137
NEXT_TELEMETRY_DISABLED=1 \
4238
NODE_ENV="production"
4339

@@ -86,7 +82,8 @@ USER nextjs
8682
EXPOSE 3000
8783

8884
ENV PORT=3000
85+
ENV HOSTNAME="0.0.0.0"
8986

9087
# server.js is created by next build from the standalone output
9188
# https://nextjs.org/docs/pages/api-reference/next-config-js/output
92-
CMD ["HOSTNAME='0.0.0.0'", "node", "server.js"]
89+
CMD ["node", "server.js"]

0 commit comments

Comments
 (0)