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

Github workflow for arm v7 and arm64 docker image #247

Merged
merged 3 commits into from
Apr 16, 2020
Merged
Changes from all 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
49 changes: 49 additions & 0 deletions .github/workflows/docker-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Docker build and push

on:
push:
branches:
- master

jobs:
Publish-to-docker:
runs-on: ubuntu-latest
env:
DOCKER_TAG: latest-multi
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Set up Docker Buildx
id: buildx
uses: crazy-max/ghaction-docker-buildx@v1
with:
version: latest
-
name: List available platforms
run: echo ${{ steps.buildx.outputs.platforms }}
-
name: Docker login (set DOCKER_USERNAME and DOCKER_PASSWORD in secrets)
if: ${{ success() && startsWith(github.repository, 'vouch/')}} # Remove this line, if you want everybody to publish to docker hub
run:
docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
-
name: Publish to docker as voucher/vouch-proxy
if: ${{ success() && startsWith(github.repository, 'vouch/')}}
run: |
docker buildx build \
--platform linux/arm/v7,linux/arm64 \
--push \
-t voucher/vouch-proxy:$DOCKER_TAG \
.
# Uncomment below to have github build to docker for every user. Watch out for indentation
# -
# name: Publish to docker as github_user/github_repo
# if: ${{ success() && !startsWith(github.repository, 'vouch/')}}
# run: |
# docker buildx build \
# --platform linux/amd64,linux/arm/v7,linux/arm64 \
# --push \
# -t $GITHUB_REPOSITORY:latest \
# .