Skip to content

Commit

Permalink
Bump github actions to latest, include QEMU for multi platform support
Browse files Browse the repository at this point in the history
  • Loading branch information
ud3sh committed Oct 2, 2023
1 parent 108d316 commit 7b11597
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 20 deletions.
27 changes: 12 additions & 15 deletions .github/workflows/build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,33 +9,30 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Login to Docker Hub
uses: docker/login-action@v1
- name: Checkout
uses: actions/checkout@v4
- 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@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Build and push main image
- name: Build and push main image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
platform: linux/arm64,linux/amd64
platform: linux/amd64,linux/arm64
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/devenv:latest
-
name: Build and push lite image (no DuckDB support)
- name: Build and push lite image (no DuckDB support)
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile-lite
push: true
platform: linux/arm64,linux/amd64
platform: linux/amd64,linux/arm64
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/devenv-lite:latest
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM sitespeedio/node:ubuntu-22.04-nodejs-18.16.0
ARG WORKSPACE_DIR=/evidence-workspace

RUN apt-get update && apt-get install -y \
curl wget nano git xdg-utils && \
curl wget nano git xdg-utils && \
npm install -g degit && \
mkdir -p ${WORKSPACE_DIR} && \
mkdir -p /evidence-bin && \
Expand Down
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Docker Development Environment

The Evidence Docker Development Evironment (devenv) is avaiable on [Dockerhub](https://hub.docker.com/repositories/evidencedev).
The Evidence Docker Development Evironment (devenv) is available on [Dockerhub](https://hub.docker.com/repositories/evidencedev).

An instance of an `devenv` image can be used as a development environment for Evidence projects using a mounted directory. Using this container allows end users to develop Evidence sites without the need for installing any toolchains besides `Docker`.

This is the repo that builds the [Evidence `devenv` images](https://hub.docker.com/repositories/evidencedev).
This repo contains the dockerfiles and the publishing action for [Evidence `devenv` images](https://hub.docker.com/repositories/evidencedev).

## Using the Evidence Docker Development Environment

Expand Down Expand Up @@ -35,8 +35,6 @@ Docker tools are installed using [Docker Desktop](https://www.docker.com/product
# - Any edits made in <path-to-your-evidence-project-root> should be reflected on the browser.
```

Note: if you are running Evidence from a new Apple Silicon MacBook (or any machine with an `arm` chipset), you'll have to provide a `--platform linux/amd64` argument to Docker as well for emulation.

### Alternative running options

#### Using a script to start the dev env
Expand Down

0 comments on commit 7b11597

Please sign in to comment.