diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..9b754f7 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,6 @@ +# Ignore all +** + +# Allow only docker duild files +!Dockerfile.* +!*.sh \ No newline at end of file diff --git a/.github/workflows/docker-buildx-dev.yml b/.github/workflows/docker-buildx-dev.yml new file mode 100644 index 0000000..d7557ea --- /dev/null +++ b/.github/workflows/docker-buildx-dev.yml @@ -0,0 +1,84 @@ +name: docker-buildx-dev + +on: + push: + branches: dev + +jobs: + multi-arch-dev: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v2 + with: + ref: ${{ github.ref }} + - + name: Set up QEMU + uses: docker/setup-qemu-action@v1 + with: + platforms: all + - + name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v1 + with: + version: latest + - + name: Available platforms + run: echo ${{ steps.buildx.outputs.platforms }} + - + name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - + name: Build and push multi-arch dev + uses: docker/build-push-action@v2 + with: + context: . + file: ./Dockerfile.amd64 + platforms: | + linux/amd64 + linux/arm64 + linux/arm/v7 + linux/arm/v6 + push: true + tags: ${{ github.repository }}:dev + - + name: Build and push AMD64 + uses: docker/build-push-action@v2 + with: + context: . + file: ./Dockerfile.amd64 + platforms: linux/amd64 + push: true + tags: ${{ github.repository }}:amd64dev + - + name: Build and push ARM64v8 + uses: docker/build-push-action@v2 + with: + context: . + file: ./Dockerfile.arm64 + platforms: linux/arm64 + push: true + tags: ${{ github.repository }}:arm64dev + - + name: Build and push ARM32v7 + uses: docker/build-push-action@v2 + with: + context: . + file: ./Dockerfile.arm + platforms: linux/arm/v7 + push: true + tags: ${{ github.repository }}:armv7dev + - + name: Build and push ARM32v6 + uses: docker/build-push-action@v2 + with: + context: . + file: ./Dockerfile.arm + platforms: linux/arm/v6 + push: true + tags: ${{ github.repository }}:armdev diff --git a/.github/workflows/docker-buildx-latest.yml b/.github/workflows/docker-buildx-latest.yml new file mode 100644 index 0000000..ac8b96c --- /dev/null +++ b/.github/workflows/docker-buildx-latest.yml @@ -0,0 +1,84 @@ +name: docker-buildx-latest + +on: + push: + branches: master + +jobs: + multi-arch-latest: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v2 + with: + ref: ${{ github.ref }} + - + name: Set up QEMU + uses: docker/setup-qemu-action@v1 + with: + platforms: all + - + name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v1 + with: + version: latest + - + name: Available platforms + run: echo ${{ steps.buildx.outputs.platforms }} + - + name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - + name: Build and push multi-arch latest + uses: docker/build-push-action@v2 + with: + context: . + file: ./Dockerfile.amd64 + platforms: | + linux/amd64 + linux/arm64 + linux/arm/v7 + linux/arm/v6 + push: true + tags: ${{ github.repository }}:latest + - + name: Build and push AMD64 + uses: docker/build-push-action@v2 + with: + context: . + file: ./Dockerfile.amd64 + platforms: linux/amd64 + push: true + tags: ${{ github.repository }}:amd64 + - + name: Build and push ARM64v8 + uses: docker/build-push-action@v2 + with: + context: . + file: ./Dockerfile.arm64 + platforms: linux/arm64 + push: true + tags: ${{ github.repository }}:arm64 + - + name: Build and push ARM32v7 + uses: docker/build-push-action@v2 + with: + context: . + file: ./Dockerfile.arm + platforms: linux/arm/v7 + push: true + tags: ${{ github.repository }}:armv7 + - + name: Build and push ARM32v6 + uses: docker/build-push-action@v2 + with: + context: . + file: ./Dockerfile.arm + platforms: linux/arm/v6 + push: true + tags: ${{ github.repository }}:arm