client+server/docker: build ARM images for Docker Hub
This commit is contained in:
parent
4f57f49ebe
commit
c64983002e
1 changed files with 27 additions and 17 deletions
44
.github/workflows/build-containers.yml
vendored
44
.github/workflows/build-containers.yml
vendored
|
@ -4,6 +4,12 @@ jobs:
|
||||||
build-client:
|
build-client:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
- name: Login to Docker Hub
|
||||||
|
uses: docker/login-action@v1
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
|
@ -26,9 +32,17 @@ jobs:
|
||||||
echo "Build Info: ${BUILD_INFO}"
|
echo "Build Info: ${BUILD_INFO}"
|
||||||
echo "Build Date: ${BUILD_DATE}"
|
echo "Build Date: ${BUILD_DATE}"
|
||||||
|
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v1
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
id: buildx
|
||||||
|
uses: docker/setup-buildx-action@v1
|
||||||
|
|
||||||
- name: Build container
|
- name: Build container
|
||||||
run: >
|
run: >
|
||||||
docker build
|
docker buildx build --push
|
||||||
|
--platform linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
|
||||||
--build-arg BUILD_INFO=${{ env.build_info }}
|
--build-arg BUILD_INFO=${{ env.build_info }}
|
||||||
--build-arg BUILD_DATE=${{ env.build_date }}
|
--build-arg BUILD_DATE=${{ env.build_date }}
|
||||||
--build-arg SOURCE_COMMIT=$GITHUB_SHA
|
--build-arg SOURCE_COMMIT=$GITHUB_SHA
|
||||||
|
@ -38,18 +52,15 @@ jobs:
|
||||||
-t "szurubooru/client:${{ env.minor_tag }}"
|
-t "szurubooru/client:${{ env.minor_tag }}"
|
||||||
./client
|
./client
|
||||||
|
|
||||||
|
build-server:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
- name: Login to Docker Hub
|
- name: Login to Docker Hub
|
||||||
uses: docker/login-action@v1
|
uses: docker/login-action@v1
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
||||||
|
|
||||||
- name: Push containers
|
|
||||||
run: docker push -a szurubooru/client
|
|
||||||
|
|
||||||
build-server:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
|
@ -72,9 +83,17 @@ jobs:
|
||||||
echo "Build Info: ${BUILD_INFO}"
|
echo "Build Info: ${BUILD_INFO}"
|
||||||
echo "Build Date: ${BUILD_DATE}"
|
echo "Build Date: ${BUILD_DATE}"
|
||||||
|
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v1
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
id: buildx
|
||||||
|
uses: docker/setup-buildx-action@v1
|
||||||
|
|
||||||
- name: Build container
|
- name: Build container
|
||||||
run: >
|
run: >
|
||||||
docker build
|
docker buildx build --push
|
||||||
|
--platform linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
|
||||||
--build-arg BUILD_DATE=${{ env.build_date }}
|
--build-arg BUILD_DATE=${{ env.build_date }}
|
||||||
--build-arg SOURCE_COMMIT=$GITHUB_SHA
|
--build-arg SOURCE_COMMIT=$GITHUB_SHA
|
||||||
--build-arg DOCKER_REPO=szurubooru/server
|
--build-arg DOCKER_REPO=szurubooru/server
|
||||||
|
@ -82,12 +101,3 @@ jobs:
|
||||||
-t "szurubooru/server:${{ env.major_tag }}"
|
-t "szurubooru/server:${{ env.major_tag }}"
|
||||||
-t "szurubooru/server:${{ env.minor_tag }}"
|
-t "szurubooru/server:${{ env.minor_tag }}"
|
||||||
./server
|
./server
|
||||||
|
|
||||||
- name: Login to Docker Hub
|
|
||||||
uses: docker/login-action@v1
|
|
||||||
with:
|
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
||||||
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
|
||||||
|
|
||||||
- name: Push containers
|
|
||||||
run: docker push -a szurubooru/server
|
|
||||||
|
|
Loading…
Reference in a new issue