From 69fec8f7dd088a58fcc5a15ab30df78c726b4355 Mon Sep 17 00:00:00 2001 From: Kavin <20838718+FireMasterK@users.noreply.github.com> Date: Fri, 2 Dec 2022 20:29:00 +0000 Subject: [PATCH] Replace github actions with circle ci. --- .circleci/config.yml | 56 ++++++++++++++++++++++++++++++ .github/buildkitd.toml | 2 -- .github/workflows/build-docker.yml | 49 -------------------------- 3 files changed, 56 insertions(+), 51 deletions(-) create mode 100644 .circleci/config.yml delete mode 100644 .github/buildkitd.toml delete mode 100644 .github/workflows/build-docker.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..4d2ecb0 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,56 @@ +version: 2.1 + +jobs: + arm64: + machine: + image: ubuntu-2004:current + resource_class: arm.medium + steps: + - checkout + - run: + command: | + export DOCKER_BUILDKIT=1 BUILDKIT_PROGRESS=plain + docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD + docker build -t 1337kavin/piped-proxy:latest-arm64 . + docker push 1337kavin/piped-proxy:latest-arm64 + amd64: + machine: + image: ubuntu-2004:current + resource_class: medium + steps: + - checkout + - run: + command: | + export DOCKER_BUILDKIT=1 BUILDKIT_PROGRESS=plain + docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD + docker build -t 1337kavin/piped-proxy:latest-amd64 . + docker push 1337kavin/piped-proxy:latest-amd64 + push: + machine: + image: ubuntu-2004:current + resource_class: medium + steps: + - run: + command: | + docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD + docker manifest create 1337kavin/piped-proxy:latest 1337kavin/piped-proxy:latest-arm64 1337kavin/piped-proxy:latest-amd64 + docker manifest push 1337kavin/piped-proxy:latest + +workflows: + build-docker: + jobs: + - arm64: + filters: + branches: + only: main + - amd64: + filters: + branches: + only: main + - push: + filters: + branches: + only: main + requires: + - arm64 + - amd64 diff --git a/.github/buildkitd.toml b/.github/buildkitd.toml deleted file mode 100644 index 1ca32ce..0000000 --- a/.github/buildkitd.toml +++ /dev/null @@ -1,2 +0,0 @@ -[worker.oci] -max-parallelism = 1 diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml deleted file mode 100644 index 9be9640..0000000 --- a/.github/workflows/build-docker.yml +++ /dev/null @@ -1,49 +0,0 @@ -name: Docker Multi-Architecture Build - -on: - push: - paths-ignore: - - "**.md" - branches: - - main - -jobs: - build-docker-image: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - with: - platforms: all - - name: Set up Docker BuildX - uses: docker/setup-buildx-action@v2 - with: - config: .github/buildkitd.toml - version: latest - - name: Cache Docker layers - uses: actions/cache@v3 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - name: Login to DockerHub - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - name: Build and push - uses: docker/build-push-action@v3 - with: - context: . - file: ./Dockerfile - platforms: linux/amd64,linux/arm64 - push: true - tags: 1337kavin/piped-proxy:latest - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: Move cache - run: | - rm -rf /tmp/.buildx-cache - mv /tmp/.buildx-cache-new /tmp/.buildx-cache