-
Notifications
You must be signed in to change notification settings - Fork 560
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
Added multi-arch support including ARM. #241
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,9 +8,12 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Build container image | ||
run: | | ||
docker build -t aws-efs-csi-driver . | ||
- name: Set up Docker Buildx | ||
id: buildx | ||
uses: crazy-max/ghaction-docker-buildx@v3 | ||
with: | ||
buildx-version: latest | ||
qemu-version: latest | ||
- name: Push to Github registry | ||
run: | | ||
USER=$(echo $GITHUB_REPOSITORY | cut -d'/' -f1) | ||
|
@@ -23,6 +26,7 @@ jobs: | |
TAG=$BRANCH | ||
fi | ||
docker login docker.pkg.github.com -u $USER -p ${{ secrets.REGISTRY_TOKEN }} | ||
docker build -t aws-efs-csi-driver . | ||
docker tag aws-efs-csi-driver docker.pkg.github.com/$GITHUB_REPOSITORY/$IMAGE:$TAG | ||
docker push docker.pkg.github.com/$GITHUB_REPOSITORY/$IMAGE:$TAG | ||
if [ "$BRANCH" = "master" ]; then | ||
|
@@ -40,9 +44,16 @@ jobs: | |
TAG=$BRANCH | ||
fi | ||
docker login -u ${{ secrets.DOCKERHUB_USER }} -p ${{ secrets.DOCKERHUB_TOKEN }} | ||
docker tag aws-efs-csi-driver $REPO:$TAG | ||
docker push $REPO:$TAG | ||
|
||
docker buildx build \ | ||
-t $REPO:$TAG \ | ||
--platform=linux/amd64,linux/arm64 \ | ||
--progress plain \ | ||
--push . | ||
Comment on lines
+48
to
+52
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
https://medium.com/@artur.klauser/building-multi-architecture-docker-images-with-buildx-27d80f7e2408 |
||
if [ "$BRANCH" = "master" ]; then | ||
docker tag aws-efs-csi-driver $REPO:master | ||
docker push $REPO:master | ||
docker buildx build \ | ||
-t $REPO:master \ | ||
--platform=linux/amd64,linux/arm64 \ | ||
--progress plain \ | ||
--push . | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need for a separate build step because
docker buildx
build and push are run at the same step.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://medium.com/@artur.klauser/building-multi-architecture-docker-images-with-buildx-27d80f7e2408