Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

arm64 support #256

Closed
wants to merge 16 commits into from
Closed
Show file tree
Hide file tree
Changes from 15 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .autorc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"email": "[email protected]"
},
"plugins": [
["docker", { "registry": "ejhayes/nodejs-bull-monitor", "tagLatest": false}],
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to have the build-push-action export to docker locally and keep the auto shipit action responsible for pushing to docker, but ran into this lmitation:

The default image store in Docker Engine doesn't support loading multi-platform images. You can enable the containerd image store, or push multi-platform images is to directly push to a registry, see registry.

https://docs.docker.com/engine/reference/commandline/buildx_build/#docker

["released", { "includeBotPrs": true }],
["first-time-contributor"],
["all-contributors", {
Expand Down
28 changes: 17 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,11 @@ on:
jobs:
release:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')"
if: (!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci'))
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.GH_TOKEN }}

- uses: oleksiyrudenko/[email protected]
with:
token: '${{ secrets.GH_TOKEN }}'

- name: Prepare repository
run: git fetch --unshallow --tags
fetch-tags: true
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this will give us what we need but it was hard for me to determine original reasoning here for the extra steps.


- uses: actions/setup-node@v3
with:
Expand All @@ -34,6 +27,12 @@ jobs:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

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

- name: Login to Docker Hub
uses: docker/login-action@v2
with:
Expand All @@ -42,12 +41,19 @@ jobs:

- run: npm ci

- run: npm run ci:build
- run: npm run build

- name: Build multi-arch image
uses: docker/build-push-action@v5
with:
platforms: linux/amd64,linux/arm64
context: .
push: true
tags: ejhayes/nodejs-bull-monitor:latest

- name: Create Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
IMAGE: 'bull-monitor:latest'
run: |
npx auto shipit

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ WORKDIR /app
RUN apk add --no-cache openssh git
COPY package* ./
RUN npm install --omit=dev
COPY dist ./
COPY ./dist ./

FROM golang:latest as go
RUN go install -v github.com/oauth2-proxy/oauth2-proxy/v7@latest
Expand Down
2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
"scripts": {
"prebuild": "rimraf dist",
"build": "nest build",
"ci:build": "npm run build && docker-compose build bull-monitor",
"ci:publish": "npm run ci:build && docker-compose push bull-monitor",
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't see ci:publish getting used anywhere, and ci:build functionality is encapsulated in the build-push-action step

"format": "prettier --write .",
"generate": "ACTION=createprocess MAX_JOB_DELAY_MS=200 LIMITER_MAX=200 CREATE_DELAY_MS=50 CONCURRENCY=15 ts-node bull_generator.ts",
"generate:create": "ACTION=create CREATE_DELAY_MS=50 ts-node bull_generator.ts",
Expand Down
Loading