Skip to content

Commit

Permalink
Try multi-platform builds and push to ghcr.io
Browse files Browse the repository at this point in the history
  • Loading branch information
joao-p-marques committed Nov 25, 2020
1 parent 38f530a commit eac6dca
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,32 @@ jobs:
- run: poetry install
# Run tests
- run: poetry run pytest
build-push:
runs-on: ubuntu-latest
needs: test
env:
# Variables found by default in Docker Hub builder
DOCKER_REGISTRY: ghcr.io
DOCKER_REPO: tecnativa/docker-socket-proxy
steps:
# Prepare
- uses: actions/checkout@v2
- uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
# Build and push
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm/v8,linux/arm64,linux/ppc64le,linux/s390x
push: true
tags: |
${{ DOCKER_REGISTRY }}/${{ DOCKER_REPO }}

0 comments on commit eac6dca

Please sign in to comment.