diff --git a/.github/workflows/github-release.yml b/.github/workflows/github-release.yml index 623bbcf979..6306ce8f38 100644 --- a/.github/workflows/github-release.yml +++ b/.github/workflows/github-release.yml @@ -190,11 +190,17 @@ jobs: needs: [prelude, buildClient, buildServer, buildRts] runs-on: ubuntu-latest + permissions: + contents: read + id-token: write steps: - name: Checkout the merged commit from PR and base branch uses: actions/checkout@v2 + - name: Set up Depot CLI + uses: depot/setup-action@v1 + - name: Download the client build artifact uses: actions/download-artifact@v2 with: @@ -219,12 +225,6 @@ jobs: name: rts-build-deps path: app/rts/node_modules/ - - name: Set up QEMU (needed for docker buildx) - uses: docker/setup-qemu-action@v1 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - name: Login to DockerHub uses: docker/login-action@v1 with: @@ -232,53 +232,87 @@ jobs: password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} - name: Build and push client image - working-directory: app/client - run: | - docker build -t ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-editor:${{needs.prelude.outputs.tag}} . - docker push ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-editor:${{needs.prelude.outputs.tag}} + uses: depot/build-push-action@v1 + with: + context: app/client + push: true + tags: | + ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-editor:${{needs.prelude.outputs.tag}} - # Only build & tag with latest if the tag doesn't contain beta - if [[ ! ${{needs.prelude.outputs.tag}} == *"beta"* ]]; then - docker build -t ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-editor:latest . - docker push ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-editor:latest - fi + # Only build & tag with latest if the tag doesn't contain beta + - name: Build and push client image latest + if: '!contains(needs.prelude.outputs.tag, "beta")' + uses: depot/build-push-action@v1 + with: + context: app/client + push: true + tags: | + ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-editor:latest - name: Build and push fat image - run: | - tag_args="--tag ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-ce:${{needs.prelude.outputs.tag}}" + uses: depot/build-push-action@v1 + with: + context: . + push: true + platforms: linux/arm64,linux/amd64 + build-args: | + APPSMITH_SEGMENT_CE_KEY=${{ secrets.APPSMITH_SEGMENT_CE_KEY }} + tags: | + ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-ce:${{needs.prelude.outputs.tag}} - # Only build & tag with latest if the tag doesn't contain beta - if [[ ! ${{needs.prelude.outputs.tag}} == *"beta"* ]]; then - tag_args="$tag_args --tag ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-ce:latest" - fi - - docker buildx build \ - --platform linux/arm64,linux/amd64 \ - --push \ - --build-arg APPSMITH_SEGMENT_CE_KEY=${{ secrets.APPSMITH_SEGMENT_CE_KEY }} \ - $tag_args \ - . + # Only build & tag with latest if the tag doesn't contain beta + - name: Build and push fat image latest + if: '!contains(needs.prelude.outputs.tag, "beta")' + uses: depot/build-push-action@v1 + with: + context: . + push: true + platforms: linux/arm64,linux/amd64 + build-args: | + APPSMITH_SEGMENT_CE_KEY=${{ secrets.APPSMITH_SEGMENT_CE_KEY }} + tags: | + ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-ce:latest - name: Build and push server image - working-directory: app/server - run: | - docker build --build-arg APPSMITH_SEGMENT_CE_KEY=${{ secrets.APPSMITH_SEGMENT_CE_KEY }} -t ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-server:${{needs.prelude.outputs.tag}} . - docker push ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-server:${{needs.prelude.outputs.tag}} + uses: depot/build-push-action@v1 + with: + context: app/server + push: true + build-args: | + APPSMITH_SEGMENT_CE_KEY=${{ secrets.APPSMITH_SEGMENT_CE_KEY }} + tags: | + ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-server:${{needs.prelude.outputs.tag}} - # Only build & tag with latest if the tag doesn't contain beta - if [[ ! ${{needs.prelude.outputs.tag}} == *"beta"* ]]; then - docker build --build-arg APPSMITH_SEGMENT_CE_KEY=${{ secrets.APPSMITH_SEGMENT_CE_KEY }} -t ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-server:latest . - docker push ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-server:latest - fi + # Only build & tag with latest if the tag doesn't contain beta + - name: Build and push server image latest + if: '!contains(needs.prelude.outputs.tag, "beta")' + uses: depot/build-push-action@v1 + with: + context: app/server + push: true + platforms: linux/arm64,linux/amd64 + build-args: | + APPSMITH_SEGMENT_CE_KEY=${{ secrets.APPSMITH_SEGMENT_CE_KEY }} + tags: | + ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-server:latest - name: Build and push RTS image - working-directory: app/rts - run: | - docker build -t ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-rts:${{needs.prelude.outputs.tag}} . - docker push ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-rts:${{needs.prelude.outputs.tag}} + uses: depot/build-push-action@v1 + with: + context: app/rts + push: true + tags: | + ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-rts:${{needs.prelude.outputs.tag}} - # Only build & tag with latest if the tag doesn't contain beta - if [[ ! ${{needs.prelude.outputs.tag}} == *"beta"* ]]; then - docker build -t ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-rts:latest . - docker push ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-rts:latest - fi + # Only build & tag with latest if the tag doesn't contain beta + - name: Build and push RTS image latest + if: '!contains(needs.prelude.outputs.tag, "beta")' + uses: depot/build-push-action@v1 + with: + context: app/rts + push: true + platforms: linux/arm64,linux/amd64 + build-args: | + APPSMITH_SEGMENT_CE_KEY=${{ secrets.APPSMITH_SEGMENT_CE_KEY }} + tags: | + ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-rts:latest diff --git a/.github/workflows/integration-tests-command.yml b/.github/workflows/integration-tests-command.yml index 4052042a66..27da4bebd4 100644 --- a/.github/workflows/integration-tests-command.yml +++ b/.github/workflows/integration-tests-command.yml @@ -29,6 +29,9 @@ jobs: # Only run if the build step is successful if: success() runs-on: ubuntu-latest + permissions: + contents: read + id-token: write defaults: run: shell: bash @@ -52,6 +55,9 @@ jobs: - 27017:27017 steps: + - name: Set up Depot CLI + uses: depot/setup-action@v1 + # Check out merge commit - name: Fork based /ok-to-test checkout uses: actions/checkout@v2 @@ -132,11 +138,14 @@ jobs: name: rts-build path: app/rts/dist/ - - name: Build docker image - if: steps.run_result.outputs.run_result != 'success' - working-directory: "." - run: | - docker build -t fatcontainer . + - name: Build docker image + uses: depot/build-push-action@v1 + with: + context: . + push: false + load: true + tags: | + fatcontainer - name: Create folder if: steps.run_result.outputs.run_result != 'success' @@ -880,11 +889,9 @@ jobs: PAYLOAD_CONTEXT: ${{ toJson(github.event.client_payload) }} run: echo "$PAYLOAD_CONTEXT" -<<<<<<< HEAD -======= package: needs: [ui-test, fat-container-test] - runs-on: buildjet-4vcpu-ubuntu-2004 + runs-on: ubuntu-latest defaults: run: working-directory: app/client @@ -950,246 +957,11 @@ jobs: return result; } ->>>>>>> 4d609a5b4d5e203c84aba12475a44ac6770eff0d perf-test: needs: [client-build, server-build, rts-build] # Only run if the build step is successful if: success() -<<<<<<< HEAD name: perf-test uses: ./.github/workflows/perf-test.yml with: pr: ${{ github.event.client_payload.pull_request.number }} -======= - runs-on: buildjet-4vcpu-ubuntu-2004 - - defaults: - run: - working-directory: app/client - shell: bash - - # Service containers to run with this job. Required for running tests - services: - # Label used to access the service container - redis: - # Docker Hub image for Redis - image: redis - ports: - # Opens tcp port 6379 on the host and service container - - 6379:6379 - mongo: - image: mongo - ports: - - 27017:27017 - steps: - # Check out merge commitGIT BRANCH - - name: Fork based /ok-to-test-perf checkout - uses: actions/checkout@v2 - with: - ref: "refs/pull/${{ github.event.client_payload.pull_request.number }}/merge" - - # Timestamp will be used to create cache key - - id: timestamp - run: echo "::set-output name=timestamp::$(timestamp +'%Y-%m-%dT%H:%M:%S')" - - # In case this is second attempt try restoring status of the prior attempt from cache - - name: Restore the previous run result - uses: actions/cache@v2 - with: - path: | - ~/run_result - key: ${{ github.run_id }}-${{ github.job }}-${{ steps.timestamp.outputs.timestamp }} - restore-keys: | - ${{ github.run_id }}-${{ github.job }}- - - # Fetch prior run result - - name: Get the previous run result - id: run_result - run: cat ~/run_result 2>/dev/null || echo 'default' - - # Incase of prior failure run the job - - if: steps.run_result.outputs.run_result != 'success' - run: echo "I'm alive!" && exit 0 - - # Set status = success - - run: echo "::set-output name=run_result::success" > ~/run_result - - - name: Use Node.js 16.14.0 - if: steps.run_result.outputs.run_result != 'success' - uses: actions/setup-node@v1 - with: - node-version: "16.14.0" - - - name: Get yarn cache directory path - if: steps.run_result.outputs.run_result != 'success' - id: yarn-dep-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" - - # Retrieve npm dependencies from cache. After a successful run, these dependencies are cached again - - name: Cache npm dependencies - if: steps.run_result.outputs.run_result != 'success' - id: yarn-dep-cache - uses: actions/cache@v2 - env: - cache-name: cache-yarn-dependencies - with: - path: | - ${{ steps.yarn-dep-cache-dir-path.outputs.dir }} - key: ${{ runner.os }}-yarn-dep-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn-dep- - - # Install all the dependencies - - name: Install dependencies - if: steps.run_result.outputs.run_result != 'success' - run: yarn install --frozen-lockfile - - - name: Download the react build artifact - if: steps.run_result.outputs.run_result != 'success' - uses: actions/download-artifact@v2 - with: - name: build - path: app/client/build - - - name: Download the server build artifact - if: steps.run_result.outputs.run_result != 'success' - uses: actions/download-artifact@v2 - with: - name: build - path: app/server/dist - - # Start server - - name: start server - if: steps.run_result.outputs.run_result != 'success' - working-directory: app/server - env: - APPSMITH_MONGODB_URI: "mongodb://localhost:27017/mobtools" - APPSMITH_REDIS_URL: "redis://127.0.0.1:6379" - APPSMITH_ENCRYPTION_PASSWORD: "password" - APPSMITH_ENCRYPTION_SALT: "salt" - APPSMITH_IS_SELF_HOSTED: false - APPSMITH_CLOUD_SERVICES_BASE_URL: https://release-cs.appsmith.com - APPSMITH_CLOUD_SERVICES_USERNAME: "" - APPSMITH_CLOUD_SERVICES_PASSWORD: "" - APPSMITH_GIT_ROOT: "./container-volumes/git-storage" - run: | - ls -l - ls -l scripts/ - ls -l dist/ - # Run the server in the background and redirect logs to a log file - ./scripts/start-dev-server.sh &> server-logs.log & - - - name: Wait for 30 seconds for server to start - if: steps.run_result.outputs.run_result != 'success' - run: | - sleep 30s - - - name: Exit if Server hasnt started - if: steps.run_result.outputs.run_result != 'success' - run: | - if [[ `ps -ef | grep "server-1.0-SNAPSHOT" | grep java |wc -l` == 0 ]]; then - echo "Server Not Started"; - exit 1; - else - echo "Server Found"; - fi - - - name: Installing Yarn serve - if: steps.run_result.outputs.run_result != 'success' - run: | - yarn global add serve - echo "$(yarn global bin)" >> $GITHUB_PATH - - - name: Setting up the perf tests - if: steps.run_result.outputs.run_result != 'success' - shell: bash - env: - APPSMITH_SSL_CERTIFICATE: ${{ secrets.APPSMITH_SSL_CERTIFICATE }} - APPSMITH_SSL_KEY: ${{ secrets.APPSMITH_SSL_KEY }} - CYPRESS_URL: ${{ secrets.CYPRESS_URL }} - CYPRESS_USERNAME: ${{ secrets.CYPRESS_USERNAME }} - CYPRESS_PASSWORD: ${{ secrets.CYPRESS_PASSWORD }} - CYPRESS_TESTUSERNAME1: ${{ secrets.CYPRESS_TESTUSERNAME1 }} - CYPRESS_TESTPASSWORD1: ${{ secrets.CYPRESS_TESTPASSWORD1 }} - CYPRESS_TESTUSERNAME2: ${{ secrets.CYPRESS_TESTUSERNAME2 }} - CYPRESS_TESTPASSWORD2: ${{ secrets.CYPRESS_TESTPASSWORD1 }} - CYPRESS_S3_ACCESS_KEY: ${{ secrets.CYPRESS_S3_ACCESS_KEY }} - CYPRESS_S3_SECRET_KEY: ${{ secrets.CYPRESS_S3_SECRET_KEY }} - CYPRESS_APPSMITH_OAUTH2_GOOGLE_CLIENT_ID: ${{ secrets.CYPRESS_APPSMITH_OAUTH2_GOOGLE_CLIENT_ID }} - CYPRESS_APPSMITH_OAUTH2_GOOGLE_CLIENT_SECRET: ${{ secrets.CYPRESS_APPSMITH_OAUTH2_GOOGLE_CLIENT_SECRET }} - CYPRESS_APPSMITH_OAUTH2_GITHUB_CLIENT_ID: ${{ secrets.CYPRESS_APPSMITH_OAUTH2_GITHUB_CLIENT_ID }} - CYPRESS_APPSMITH_OAUTH2_GITHUB_CLIENT_SECRET: ${{ secrets.CYPRESS_APPSMITH_OAUTH2_GITHUB_CLIENT_SECRET }} - APPSMITH_DISABLE_TELEMETRY: true - APPSMITH_GOOGLE_MAPS_API_KEY: ${{ secrets.APPSMITH_GOOGLE_MAPS_API_KEY }} - POSTGRES_PASSWORD: postgres - run: | - ./cypress/setup-test.sh - - - name: Checkout Performance Infra code - uses: actions/checkout@v3 - with: - repository: appsmithorg/performance-infra - token: ${{ secrets.APPSMITH_PERF_INFRA_REPO_PAT }} - ref: main - path: app/client/perf - - - name: Installing performance tests dependencies - if: steps.run_result.outputs.run_result != 'success' - working-directory: app/client/perf - shell: bash - run: yarn install --frozen-lockfile - - - name: Change test script permissions - if: steps.run_result.outputs.run_result != 'success' - working-directory: app/client/perf - run: chmod +x ./start-test.sh - - - name: Run performance tests - if: steps.run_result.outputs.run_result != 'success' - working-directory: app/client/perf - shell: bash - env: - APPSMITH_SSL_CERTIFICATE: ${{ secrets.APPSMITH_SSL_CERTIFICATE }} - APPSMITH_SSL_KEY: ${{ secrets.APPSMITH_SSL_KEY }} - CYPRESS_TESTUSERNAME1: ${{ secrets.CYPRESS_TESTUSERNAME9 }} - CYPRESS_TESTPASSWORD1: ${{ secrets.CYPRESS_TESTPASSWORD9 }} - APPSMITH_PERFORMANCE_DB_CONFIG: ${{ secrets.APPSMITH_PERFORMANCE_DB_CONFIG }} - PERF_GITHUB_PAT: ${{ secrets.APPSMITH_PERF_INFRA_REPO_PAT }} - APPSMITH_DISABLE_TELEMETRY: true - POSTGRES_PASSWORD: postgres - NODE_TLS_REJECT_UNAUTHORIZED: "0" - run: ./start-test.sh - - # Restore the previous built bundle if present. If not push the newly built into the cache - - name: Restore the previous bundle - uses: actions/cache@v2 - with: - path: | - app/client/perf/traces - key: ${{ github.run_id }}-${{ github.job }}-${{ steps.timestamp.outputs.timestamp }} - restore-keys: | - ${{ github.run_id }}-${{ github.job }} - - - uses: actions/upload-artifact@v2 - with: - name: performance-summaries - path: app/client/perf/traces - - - name: Read summary file - id: read_summary - uses: andstor/file-reader-action@v1 - with: - path: app/client/perf/traces/reports/summary.md - - - name: Add a comment with the results on the PR with link to workflow run - uses: peter-evans/create-or-update-comment@v1 - with: - issue-number: ${{ github.event.client_payload.pull_request.number }} - body: | - UI Performance test run logs and artifacts: . - Commit: `${{ github.event.client_payload.slash_command.sha }}`. - Results: ${{ steps.read_summary.outputs.contents }} - - # Set status = success - - run: echo "::set-output name=run_result::success" > ~/run_result ->>>>>>> 4d609a5b4d5e203c84aba12475a44ac6770eff0d diff --git a/.github/workflows/rts-build.yml b/.github/workflows/rts-build.yml index e8655e58dd..c998a9646d 100644 --- a/.github/workflows/rts-build.yml +++ b/.github/workflows/rts-build.yml @@ -57,6 +57,9 @@ jobs: - name: Print the Github event run: echo ${{ github.event_name }} + - name: Set up Depot CLI + uses: depot/setup-action@v1 + # Timestamp will be used to create cache key - id: timestamp run: echo "::set-output name=timestamp::$(timestamp +'%Y-%m-%dT%H:%M:%S')" diff --git a/.github/workflows/test-build-docker-image.yml b/.github/workflows/test-build-docker-image.yml index 5ec19ca16f..6567b9f50e 100644 --- a/.github/workflows/test-build-docker-image.yml +++ b/.github/workflows/test-build-docker-image.yml @@ -629,6 +629,10 @@ jobs: github.event.review.state == 'approved' && github.event.pull_request.head.repo.full_name == github.repository)) runs-on: buildjet-4vcpu-ubuntu-2004 + permissions: + contents: read + id-token: write + defaults: run: shell: bash @@ -652,6 +656,9 @@ jobs: - 27017:27017 steps: + - name: Set up Depot CLI + uses: depot/setup-action@v1 + # Checkout the code - name: Checkout the merged commit from PR and base branch if: github.event_name == 'pull_request_review' @@ -745,9 +752,13 @@ jobs: - name: Build docker image if: steps.run_result.outputs.run_result != 'success' - working-directory: "." - run: | - docker build -t fatcontainer . + uses: depot/build-push-action@v1 + with: + context: . + push: false + load: true + tags: | + fatcontainer - name: Create folder if: steps.run_result.outputs.run_result != 'success' @@ -1549,12 +1560,6 @@ jobs: id: vars run: echo ::set-output name=tag::$(echo ${GITHUB_REF:11}) - - name: Set up QEMU (needed for docker buildx) - uses: docker/setup-qemu-action@v1 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - name: Login to DockerHub uses: docker/login-action@v1 with: @@ -1564,45 +1569,48 @@ jobs: # Build release Docker image and push to Docker Hub - name: Push client release image to Docker Hub if: success() && github.ref == 'refs/heads/release' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') - working-directory: app/client - run: | - docker build -t ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-editor:${{steps.vars.outputs.tag}} . - docker push ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-editor:${{steps.vars.outputs.tag}} + uses: depot/build-push-action@v1 + with: + context: app/client + push: true + tags: | + ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-editor:${{steps.vars.outputs.tag}} # Build master Docker image and push to Docker Hub - name: Push client master image to Docker Hub with commit tag if: success() && github.ref == 'refs/heads/master' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') - working-directory: app/client - run: | - docker build -t ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-editor:${GITHUB_SHA} . - docker build -t ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-editor:nightly . - docker push ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-editor:${GITHUB_SHA} - docker push ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-editor:nightly + uses: depot/build-push-action@v1 + with: + context: app/client + push: true + tags: | + ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-editor:${GITHUB_SHA} + ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-editor:nightly - name: Build and push release image to Docker Hub if: success() && github.ref == 'refs/heads/release' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') - working-directory: "." - run: | - tag_args="--tag ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-ce:${{steps.vars.outputs.tag}}" - docker buildx build \ - --platform linux/arm64,linux/amd64 \ - --push \ - --build-arg APPSMITH_SEGMENT_CE_KEY=${{ secrets.APPSMITH_SEGMENT_CE_KEY_RELEASE }} \ - $tag_args \ - . + uses: depot/build-push-action@v1 + with: + context: . + push: true + platforms: linux/arm64,linux/amd64 + build_args: | + APPSMITH_SEGMENT_CE_KEY=${{ secrets.APPSMITH_SEGMENT_CE_KEY_RELEASE }} + tags: | + ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-ce:${{steps.vars.outputs.tag}} - name: Build and push master image to Docker Hub with commit tag if: success() && github.ref == 'refs/heads/master' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') - working-directory: "." - run: | - tag_args="--tag ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-ce:${GITHUB_SHA}" - tag_args="$tag_args --tag ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-ce:nightly" - docker buildx build \ - --platform linux/arm64,linux/amd64 \ - --push \ - --build-arg APPSMITH_SEGMENT_CE_KEY=${{ secrets.APPSMITH_SEGMENT_CE_KEY }} \ - $tag_args \ - . + uses: depot/build-push-action@v1 + with: + context: . + push: true + platforms: linux/arm64,linux/amd64 + build_args: | + APPSMITH_SEGMENT_CE_KEY=${{ secrets.APPSMITH_SEGMENT_CE_KEY }} + tags: | + ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-ce:${GITHUB_SHA} + ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-ce:nightly # - name: Check and push fat image to Docker Hub with commit tag # if: success() && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/release') && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') @@ -1629,35 +1637,45 @@ jobs: # Build release Docker image and push to Docker Hub - name: Push server release image to Docker Hub if: success() && github.ref == 'refs/heads/release' - working-directory: app/server - run: | - docker build --build-arg APPSMITH_SEGMENT_CE_KEY=${{ secrets.APPSMITH_SEGMENT_CE_KEY_RELEASE }} -t ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-server:${{steps.vars.outputs.tag}} . - docker push ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-server:${{steps.vars.outputs.tag}} + uses: depot/build-push-action@v1 + with: + context: app/server + push: true + build_args: | + APPSMITH_SEGMENT_CE_KEY=${{ secrets.APPSMITH_SEGMENT_CE_KEY_RELEASE }} + tags: | + ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-server:${{steps.vars.outputs.tag}} # Build master Docker image and push to Docker Hub - name: Push server master image to Docker Hub with commit tag if: success() && github.ref == 'refs/heads/master' - working-directory: app/server - run: | - docker build --build-arg APPSMITH_SEGMENT_CE_KEY=${{ secrets.APPSMITH_SEGMENT_CE_KEY }} -t ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-server:${GITHUB_SHA} . - docker build --build-arg APPSMITH_SEGMENT_CE_KEY=${{ secrets.APPSMITH_SEGMENT_CE_KEY }} -t ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-server:nightly . - docker push ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-server:${GITHUB_SHA} - docker push ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-server:nightly + uses: depot/build-push-action@v1 + with: + context: app/server + push: true + build_args: | + APPSMITH_SEGMENT_CE_KEY=${{ secrets.APPSMITH_SEGMENT_CE_KEY }} + tags: | + ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-server:${GITHUB_SHA} + ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-server:nightly # Build release Docker image and push to Docker Hub - name: Push RTS release image to Docker Hub if: success() && github.ref == 'refs/heads/release' - working-directory: app/rts - run: | - docker build -t ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-rts:${{steps.vars.outputs.tag}} . - docker push ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-rts:${{steps.vars.outputs.tag}} + uses: depot/build-push-action@v1 + with: + context: app/rts + push: true + tags: | + ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-rts:${{steps.vars.outputs.tag}} # Build master Docker image and push to Docker Hub - name: Push RTS master image to Docker Hub with commit tag if: success() && github.ref == 'refs/heads/master' - working-directory: app/rts - run: | - docker build -t ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-rts:${GITHUB_SHA} . - docker build -t ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-rts:nightly . - docker push ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-rts:${GITHUB_SHA} - docker push ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-rts:nightly + uses: depot/build-push-action@v1 + with: + context: app/rts + push: true + tags: | + ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-rts:${GITHUB_SHA} + ${{ secrets.DOCKER_HUB_ORGANIZATION }}/appsmith-rts:nightly diff --git a/depot.json b/depot.json new file mode 100644 index 0000000000..f1c56eca29 --- /dev/null +++ b/depot.json @@ -0,0 +1 @@ +{"id":"ts81441f91"}