-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
55 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,34 +6,74 @@ on: | |
- master | ||
|
||
jobs: | ||
build: | ||
build-amd64: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout the repository | ||
uses: actions/[email protected] | ||
|
||
- name: Docker Setup QEMU for amd64 | ||
uses: docker/[email protected] | ||
|
||
- name: Docker Setup QEMU | ||
- name: Set up Docker Buildx for amd64 | ||
uses: docker/[email protected] | ||
|
||
- name: Log in to Docker Hub for amd64 | ||
run: echo "${{ secrets.DOCKERHUB_TOKEN }}" | docker login -u "${{ secrets.DOCKERHUB_USERNAME }}" --password-stdin | ||
|
||
- name: Build and push Docker image for amd64 | ||
run: | | ||
docker buildx build --platform linux/amd64 --push \ | ||
-t ${{ secrets.DOCKERHUB_USERNAME }}/slackonos:amd64-latest . | ||
build-arm64: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout the repository | ||
uses: actions/[email protected] | ||
|
||
- name: Docker Setup QEMU for arm64 | ||
uses: docker/[email protected] | ||
|
||
- name: Verify QEMU setup | ||
run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes | ||
|
||
- name: Set up Docker Buildx | ||
- name: Set up Docker Buildx for arm64 | ||
uses: docker/[email protected] | ||
|
||
- name: Setup Buildx builder | ||
- name: Log in to Docker Hub for arm64 | ||
run: echo "${{ secrets.DOCKERHUB_TOKEN }}" | docker login -u "${{ secrets.DOCKERHUB_USERNAME }}" --password-stdin | ||
|
||
- name: Build and push Docker image for arm64 | ||
run: | | ||
docker buildx create --name mybuilder --driver docker-container --use | ||
docker buildx inspect --bootstrap | ||
docker buildx build --platform linux/arm64 --push \ | ||
-t ${{ secrets.DOCKERHUB_USERNAME }}/slackonos:arm64-latest . | ||
build-armv7: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout the repository | ||
uses: actions/[email protected] | ||
|
||
- name: Log in to Docker Hub | ||
- name: Docker Setup QEMU for armv7 | ||
uses: docker/[email protected] | ||
|
||
- name: Set up Docker Buildx for armv7 | ||
uses: docker/[email protected] | ||
|
||
- name: Log in to Docker Hub for armv7 | ||
run: echo "${{ secrets.DOCKERHUB_TOKEN }}" | docker login -u "${{ secrets.DOCKERHUB_USERNAME }}" --password-stdin | ||
|
||
- name: Build and push multi-platform Docker image | ||
- name: Build and push Docker image for armv7 | ||
run: | | ||
docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 --push \ | ||
-t ${{ secrets.DOCKERHUB_USERNAME }}/slackonos:latest . | ||
docker buildx build --platform linux/arm/v7 --push \ | ||
-t ${{ secrets.DOCKERHUB_USERNAME }}/slackonos:armv7-latest . | ||
- name: Verify the built platforms | ||
run: docker buildx imagetools inspect ${{ secrets.DOCKERHUB_USERNAME }}/slackonos:latest | ||
verify-manifest: | ||
needs: [build-amd64, build-arm64, build-armv7] | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Verify the multi-platform image | ||
run: | | ||
docker buildx imagetools inspect ${{ secrets.DOCKERHUB_USERNAME }}/slackonos:latest |