Skip to content

Commit

Permalink
ci: add workflow to build and push image (#37)
Browse files Browse the repository at this point in the history
Signed-off-by: Mike Beaumont <[email protected]>
  • Loading branch information
michaelbeaumont authored Mar 28, 2024
1 parent d0c8b94 commit 596e7e0
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 53 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: build

on:
workflow_dispatch:
inputs:
tag:
description: Tag of image. Note that latest is used with the demo.yaml and kumactl!
required: true
type: string
push:
description: Whether to push the images
required: true
default: false
type: boolean
permissions:
contents: read

env:
DOCKER_REPO: kumahq/kuma-demo

jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- 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
if: ${{ fromJSON(inputs.push) }}
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_API_KEY }}
- name: Build and push
uses: docker/build-push-action@v5
with:
push: ${{ fromJSON(inputs.push) }}
platforms: linux/amd64, linux/arm64
tags: ${{ env.DOCKER_REPO }}:${{ inputs.tag }}
2 changes: 1 addition & 1 deletion release/Dockerfile → Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ ARG ARCH=amd64
FROM --platform=linux/${ARCH} node:alpine

RUN apk add dumb-init
COPY /app/package.json /app/package.json

COPY /app/package.json /app/package.json
RUN npm install --prefix /app

COPY /app/public /app/public
Expand Down
9 changes: 0 additions & 9 deletions release/RELEASE.md

This file was deleted.

43 changes: 0 additions & 43 deletions release/docker.sh

This file was deleted.

0 comments on commit 596e7e0

Please sign in to comment.