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

Publish arm64 Docker Image #2042

Merged
merged 3 commits into from
Mar 19, 2021
Merged
Show file tree
Hide file tree
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
15 changes: 11 additions & 4 deletions .github/workflows/docker-image-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ on:
release:
types:
- "released"
workflow_dispatch:
inputs:
versionTag:
description: "Version Tag"
required: true
default: ''

jobs:
main:
Expand All @@ -19,7 +25,8 @@ jobs:
uses: docker/setup-buildx-action@v1

- name: Get the version
id: get_version
id: get-version
if: github.event.inputs.versionTag == ''
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}

- name: Login to DockerHub
Expand All @@ -42,16 +49,16 @@ jobs:
with:
context: ./docker/onadata-uwsgi
file: ./docker/onadata-uwsgi/Dockerfile
platforms: linux/amd64
platforms: linux/amd64,linux/arm64
build-args: |
release_version=${{ steps.get_version.outputs.VERSION }}
release_version=${{ github.event.inputs.versionTag || steps.get-version.outputs.VERSION }}
optional_packages=PyYAML django-redis
push: true
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
tags: |
onaio/onadata:latest
onaio/onadata:${{ steps.get_version.outputs.VERSION }}
onaio/onadata:${{ github.event.inputs.versionTag || steps.get-version.outputs.VERSION }}

- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
5 changes: 3 additions & 2 deletions .github/workflows/ecr-image-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:

- name: Get the version
id: get-version
if: github.event.inputs.versionTag == ''
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}

- name: Configure AWS credentials
Expand All @@ -45,11 +46,11 @@ jobs:
with:
context: ./docker/onadata-uwsgi
file: ./docker/onadata-uwsgi/Dockerfile
platforms: linux/amd64
platforms: linux/amd64,linux/arm64
build-args: |
release_version=${{ github.event.inputs.versionTag || steps.get-version.outputs.VERSION }}
optional_packages=PyYAML django-redis ${{ secrets.ECR_OPTIONAL_PACKAGES }}
ssh_private_key=${{ secrets.SSH_PRIVATE_KEY }}
ssh_private_key="${{ secrets.SSH_PRIVATE_KEY }}"
push: true
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
Expand Down