Skip to content

Commit

Permalink
feature: add support for linux/arm/v7 and linux/arm64
Browse files Browse the repository at this point in the history
  • Loading branch information
ismarslomic committed May 21, 2022
1 parent 0ff5105 commit 57442da
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 32 deletions.
86 changes: 54 additions & 32 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches:
- 'main'
tags:
- 'v*'
- 'v*.*.*'
pull_request:
branches:
- 'main'
Expand All @@ -15,34 +15,56 @@ jobs:
runs-on: ubuntu-latest

steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
-
name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
-
name: Build and push
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
builder: ${{ steps.buildx.outputs.name }}
push: true
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/google-assistant-oauth:latest
cache-from: type=registry,ref=${{ secrets.DOCKER_HUB_USERNAME }}/google-assistant-oauth:buildcache
cache-to: type=registry,ref=${{ secrets.DOCKER_HUB_USERNAME }}/google-assistant-oauth:buildcache,mode=max
-
name: Docker Hub Description
uses: peter-evans/dockerhub-description@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
repository: ${{ secrets.DOCKER_HUB_USERNAME }}/google-assistant-oauth
# Get the repository's code
- name: Checkout
uses: actions/checkout@v3

# Extract metadata from GIT to use in Docker Build Push step, see https://github.com/docker/metadata-action
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
# list of Docker images to use as base name for tags
ismarslomic/google-assistant-oauth
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
# https://github.com/docker/setup-qemu-action
- name: Set up QEMU
uses: docker/setup-qemu-action@v2

# Support multiple architectures, https://github.com/docker/setup-buildx-action
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2

# https://github.com/docker/login-action
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}

# https://github.com/docker/build-push-action/
- name: Build and push
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/amd64,linux/arm/v7,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

# Update Docker Hub repo with description from README.md, see https://github.com/peter-evans/dockerhub-description
- name: Docker Hub Description
uses: peter-evans/dockerhub-description@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
repository: ${{ secrets.DOCKER_HUB_USERNAME }}/google-assistant-oauth
short-description: "Simple utility for retrieving OAuth 2.0 tokens for access to Google Assistant SDK."
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@
> Simple utility wrapped in Docker image for retrieving the OAuth 2.0 tokens for access to
> [Google Assistant Service](https://developers.google.com/assistant/sdk/overview#google_assistant_service).
## Get support

Bugs and questions related to the source code and Docker image can be reported at
[Github Issues](https://github.com/ismarslomic/google-assistant-oauth/issues) in the
[ismarslomic/google-assistant-oauth](https://github.com/ismarslomic/google-assistant-oauth) repo.


## About

In order to access the
Expand Down

0 comments on commit 57442da

Please sign in to comment.