From 3763dfa570e4863896525a8233689ec4ee3e8383 Mon Sep 17 00:00:00 2001 From: Jack Date: Sat, 26 Aug 2023 03:54:47 +0100 Subject: [PATCH] Seperate Build Jobs to speed up things --- .gitea/workflows/build-motioneye.yaml | 26 ++++++++++++++++++++++ .gitea/workflows/build-nginx.yaml | 26 ++++++++++++++++++++++ .gitea/workflows/build-php-cli.yaml | 26 ++++++++++++++++++++++ .gitea/workflows/build-php-fpm.yaml | 26 ++++++++++++++++++++++ .gitea/workflows/build.yaml | 32 --------------------------- 5 files changed, 104 insertions(+), 32 deletions(-) create mode 100644 .gitea/workflows/build-motioneye.yaml create mode 100644 .gitea/workflows/build-nginx.yaml create mode 100644 .gitea/workflows/build-php-cli.yaml create mode 100644 .gitea/workflows/build-php-fpm.yaml delete mode 100644 .gitea/workflows/build.yaml diff --git a/.gitea/workflows/build-motioneye.yaml b/.gitea/workflows/build-motioneye.yaml new file mode 100644 index 0000000..6a65e1c --- /dev/null +++ b/.gitea/workflows/build-motioneye.yaml @@ -0,0 +1,26 @@ +name: Build and push image + +on: + push: + branches: [main] + +jobs: + Build: + runs-on: ubuntu-latest + steps: + - name: Install + run: curl -fsSL get.docker.com | bash + - name: Clone + run: git clone https://git.tgj.services/thatguyjack/custom-docker-containers.git . + - name: Login + run: echo "${{ secrets.DOCKERHUB_TOKEN }}" | docker login git.tgj.services -u thatguyjack --password-stdin + - name: Buildx Container + run: docker buildx create --name buildx --driver=docker-container + - name: Build motioneye + run: docker buildx build --builder=buildx --platform=linux/amd64,linux/arm64,linux/arm/v7 ./motioneye -t git.tgj.services/thatguyjack/motioneye:latest --push +# - name: Push +# run: | +# docker push git.tgj.services/thatguyjack/php-fpm:latest +# docker push git.tgj.services/thatguyjack/php-cli:latest +# docker push git.tgj.services/thatguyjack/nginx-web:latest +# docker push git.tgj.services/thatguyjack/motioneye:latest \ No newline at end of file diff --git a/.gitea/workflows/build-nginx.yaml b/.gitea/workflows/build-nginx.yaml new file mode 100644 index 0000000..84edf98 --- /dev/null +++ b/.gitea/workflows/build-nginx.yaml @@ -0,0 +1,26 @@ +name: Build and push image + +on: + push: + branches: [main] + +jobs: + Build: + runs-on: ubuntu-latest + steps: + - name: Install + run: curl -fsSL get.docker.com | bash + - name: Clone + run: git clone https://git.tgj.services/thatguyjack/custom-docker-containers.git . + - name: Login + run: echo "${{ secrets.DOCKERHUB_TOKEN }}" | docker login git.tgj.services -u thatguyjack --password-stdin + - name: Buildx Container + run: docker buildx create --name buildx --driver=docker-container + - name: Build nginx-web + run: docker buildx build --builder=buildx --platform=linux/amd64,linux/arm64,linux/arm/v7 ./nginx-web -t git.tgj.services/thatguyjack/nginx-web:latest --push +# - name: Push +# run: | +# docker push git.tgj.services/thatguyjack/php-fpm:latest +# docker push git.tgj.services/thatguyjack/php-cli:latest +# docker push git.tgj.services/thatguyjack/nginx-web:latest +# docker push git.tgj.services/thatguyjack/motioneye:latest \ No newline at end of file diff --git a/.gitea/workflows/build-php-cli.yaml b/.gitea/workflows/build-php-cli.yaml new file mode 100644 index 0000000..02c0a85 --- /dev/null +++ b/.gitea/workflows/build-php-cli.yaml @@ -0,0 +1,26 @@ +name: Build and push image + +on: + push: + branches: [main] + +jobs: + Build: + runs-on: ubuntu-latest + steps: + - name: Install + run: curl -fsSL get.docker.com | bash + - name: Clone + run: git clone https://git.tgj.services/thatguyjack/custom-docker-containers.git . + - name: Login + run: echo "${{ secrets.DOCKERHUB_TOKEN }}" | docker login git.tgj.services -u thatguyjack --password-stdin + - name: Buildx Container + run: docker buildx create --name buildx --driver=docker-container + - name: Build php-CLI + run: docker buildx build --builder=buildx --platform=linux/amd64,linux/arm64,linux/arm/v7 ./php-cli/ -t git.tgj.services/thatguyjack/php-cli:latest --push +# - name: Push +# run: | +# docker push git.tgj.services/thatguyjack/php-fpm:latest +# docker push git.tgj.services/thatguyjack/php-cli:latest +# docker push git.tgj.services/thatguyjack/nginx-web:latest +# docker push git.tgj.services/thatguyjack/motioneye:latest \ No newline at end of file diff --git a/.gitea/workflows/build-php-fpm.yaml b/.gitea/workflows/build-php-fpm.yaml new file mode 100644 index 0000000..6464a04 --- /dev/null +++ b/.gitea/workflows/build-php-fpm.yaml @@ -0,0 +1,26 @@ +name: Build and push image + +on: + push: + branches: [main] + +jobs: + Build: + runs-on: ubuntu-latest + steps: + - name: Install + run: curl -fsSL get.docker.com | bash + - name: Clone + run: git clone https://git.tgj.services/thatguyjack/custom-docker-containers.git . + - name: Login + run: echo "${{ secrets.DOCKERHUB_TOKEN }}" | docker login git.tgj.services -u thatguyjack --password-stdin + - name: Buildx Container + run: docker buildx create --name buildx --driver=docker-container + - name: Build php-FPM + run: docker buildx build --builder=buildx --platform=linux/amd64,linux/arm64,linux/arm/v7 ./php-fpm/ -t git.tgj.services/thatguyjack/php-fpm:latest --push +# - name: Push +# run: | +# docker push git.tgj.services/thatguyjack/php-fpm:latest +# docker push git.tgj.services/thatguyjack/php-cli:latest +# docker push git.tgj.services/thatguyjack/nginx-web:latest +# docker push git.tgj.services/thatguyjack/motioneye:latest \ No newline at end of file diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml deleted file mode 100644 index 65112c5..0000000 --- a/.gitea/workflows/build.yaml +++ /dev/null @@ -1,32 +0,0 @@ -name: Build and push image - -on: - push: - branches: [main] - -jobs: - Build: - runs-on: ubuntu-latest - steps: - - name: Install - run: curl -fsSL get.docker.com | bash - - name: Clone - run: git clone https://git.tgj.services/thatguyjack/custom-docker-containers.git . - - name: Login - run: echo "${{ secrets.DOCKERHUB_TOKEN }}" | docker login git.tgj.services -u thatguyjack --password-stdin - - name: Buildx Container - run: docker buildx create --name buildx --driver=docker-container - - name: Build php-FPM - run: docker buildx build --builder=buildx --platform=linux/amd64,linux/arm64,linux/arm/v7 ./php-fpm/ -t git.tgj.services/thatguyjack/php-fpm:latest --push - - name: Build php-CLI - run: docker buildx build --builder=buildx --platform=linux/amd64,linux/arm64,linux/arm/v7 ./php-cli/ -t git.tgj.services/thatguyjack/php-cli:latest --push - - name: Build nginx-web - run: docker buildx build --builder=buildx --platform=linux/amd64,linux/arm64,linux/arm/v7 ./nginx-web -t git.tgj.services/thatguyjack/nginx-web:latest --push - - name: Build motioneye - run: docker buildx build --builder=buildx --platform=linux/amd64,linux/arm64,linux/arm/v7 ./motioneye -t git.tgj.services/thatguyjack/motioneye:latest --push - - name: Push - run: | - docker push git.tgj.services/thatguyjack/php-fpm:latest - docker push git.tgj.services/thatguyjack/php-cli:latest - docker push git.tgj.services/thatguyjack/nginx-web:latest - docker push git.tgj.services/thatguyjack/motioneye:latest \ No newline at end of file