Merge pull request #521 from messense/multiarch
Build multiarch Docker images
This commit is contained in:
commit
d83fab23cd
1 changed files with 18 additions and 13 deletions
31
.github/workflows/docker.yaml
vendored
31
.github/workflows/docker.yaml
vendored
|
@ -12,18 +12,23 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Login to registry
|
- name: Setup QEMU
|
||||||
run: |
|
uses: docker/setup-qemu-action@v1
|
||||||
docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD $DOCKER_REGISTRY_URL
|
|
||||||
env:
|
|
||||||
DOCKER_REGISTRY_URL: docker.pkg.github.com
|
|
||||||
DOCKER_USERNAME: ${{ github.actor }}
|
|
||||||
DOCKER_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Build docker image
|
- name: Setup Docker Buildx
|
||||||
run: |
|
uses: docker/setup-buildx-action@v1
|
||||||
docker build . -f alpine.Dockerfile --pull --no-cache -t docker.pkg.github.com/napi-rs/napi-rs/nodejs-rust:lts-alpine
|
|
||||||
|
|
||||||
- name: Push docker image
|
- name: Login to GitHub Container Registry
|
||||||
run: |
|
uses: docker/login-action@v1
|
||||||
docker push docker.pkg.github.com/napi-rs/napi-rs/nodejs-rust:lts-alpine
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
|
username: ${{ github.repository_owner }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Build and push
|
||||||
|
uses: docker/build-push-action@v2
|
||||||
|
with:
|
||||||
|
file: alpine.Dockerfile
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
|
push: true
|
||||||
|
tags: ghcr.io/${{ github.repository }}/nodejs-rust:lts-alpine
|
||||||
|
|
Loading…
Reference in a new issue