Skip to content

Commit

Permalink
fix: add multi platform (#39)
Browse files Browse the repository at this point in the history
(cherry picked from commit 74e0b9b)
  • Loading branch information
210-reverof authored and doxxx93 committed Jan 16, 2024
1 parent 18996ad commit 56a9168
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/dockerhub-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@ jobs:
run: |
BRANCH_NAME=$(echo $GITHUB_REF | awk -F'/' '{print $3}')
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
- name: Cache Gradle dependencies
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
gradle-
- name: Set up JDK 17
uses: actions/setup-java@v2
Expand Down Expand Up @@ -48,6 +58,7 @@ jobs:
fi
cd $DOCKERFILE_DIR
docker build -t $DOCKER_USERNAME/$BRANCH_NAME-service:latest .
docker run --privileged --rm tonistiigi/binfmt --install all
docker buildx create --use
docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
docker push $DOCKER_USERNAME/$BRANCH_NAME-service:latest
docker buildx build --platform=linux/amd64,linux/arm64 -t $DOCKER_USERNAME/$BRANCH_NAME-service:latest . --push

0 comments on commit 56a9168

Please sign in to comment.