From 7798e2812922f960104f1ed3ffdb081c678a8329 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Tue, 6 Jun 2023 15:31:35 +0530 Subject: [PATCH 1/3] ci: create CI script to build cloud images --- .github/workflows/publish.yml | 46 +++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 000000000..3f5f6ed18 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,46 @@ +name: "Release" + +on: + push: + branches: + - feat-db-pools-master + tags: + +jobs: + build-deploy: + if: startsWith(github.ref, 'refs/tags/') + name: Build + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + with: + fetch-depth: 2 + submodules: recursive + ref: feat-db-pools-master + + - name: Login to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v4 + with: + images: appwrite/cloud + tags: | + type=pep440,pattern={{version}},value=${{ github.ref_name }} + + - name: Publish to DockerHub + uses: docker/build-push-action@v4 + with: + context: . + platforms: linux/amd64 + build-args: | + VERSION=${{ steps.meta.outputs.version }} + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file From ababe6a382e459f86a44b8260ea70534964caf2b Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Tue, 6 Jun 2023 15:33:22 +0530 Subject: [PATCH 2/3] ci: update ci script --- .github/workflows/publish.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 3f5f6ed18..815087341 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -7,10 +7,10 @@ on: tags: jobs: - build-deploy: - if: startsWith(github.ref, 'refs/tags/') - name: Build + build-publish: + name: Build and Publish runs-on: ubuntu-latest + if: startsWith(github.ref, 'refs/tags/') steps: - name: Checkout repository @@ -34,7 +34,7 @@ jobs: tags: | type=pep440,pattern={{version}},value=${{ github.ref_name }} - - name: Publish to DockerHub + - name: Build & Publish to DockerHub uses: docker/build-push-action@v4 with: context: . From d4ec392a6f2c7f4c5033840830fe138827675476 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Tue, 6 Jun 2023 18:35:57 +0530 Subject: [PATCH 3/3] feat: add script --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 815087341..c410f18f2 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,4 +1,4 @@ -name: "Release" +name: "Build and Publish" on: push: