Skip to content

Commit

Permalink
Add multiplatform
Browse files Browse the repository at this point in the history
  • Loading branch information
pouya-eghbali committed Dec 11, 2023
1 parent 0de86d0 commit 61b7473
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ jobs:
- name: "Checkout GitHub Action"
uses: actions/checkout@main

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1

- name: Set up QEMU
uses: docker/setup-qemu-action@v1

- name: "Login to GitHub Container Registry"
uses: docker/login-action@v1
with:
Expand All @@ -31,12 +38,12 @@ jobs:
id: package-version
uses: martinbeentjes/[email protected]

- name: "Build Inventory Image"
env:
UNCHAINED_VERSION: ${{ steps.package-version.outputs.current-version }}
run: |
docker build --build-arg NODE_VERSION=$NODE_VERSION --build-arg UNCHAINED_VERSION=$UNCHAINED_VERSION -t unchained:latest .
docker tag unchained:latest ghcr.io/kenshitech/unchained:latest
docker tag unchained:latest ghcr.io/kenshitech/unchained:v$UNCHAINED_VERSION
docker push ghcr.io/kenshitech/unchained:latest
docker push ghcr.io/kenshitech/unchained:v$UNCHAINED_VERSION
- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: ${{ github.event_name != 'pull_request' }}
tags: |
ghcr.io/kenshitech/unchained:latest
ghcr.io/kenshitech/unchained:v${{ steps.package-version.outputs.current-version }}

0 comments on commit 61b7473

Please sign in to comment.