PromucFlow_constructor/.github/workflows/docker-base-image.yml
Goutham Pratapa 07e003f68a
chore: move docker base image build to depot (#41320)
## Description
> [!TIP]  
> _Add a TL;DR when the description is longer than 500 words or
extremely technical (helps the content, marketing, and DevRel team)._
>
> _Please also include relevant motivation and context. List any
dependencies that are required for this change. Add links to Notion,
Figma or any other documents that might be relevant to the PR._


Fixes #`Issue Number`  
_or_  
Fixes `Issue URL`
> [!WARNING]  
> _If no issue exists, please create an issue first, and check with the
maintainers if the issue is valid._

## Automation

/ok-to-test tags=""

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!CAUTION]  
> If you modify the content in this section, you are likely to disrupt
the CI result for your PR.

<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No
2025-10-27 17:21:41 +05:30

63 lines
1.5 KiB
YAML

name: Docker Base Image
on:
workflow_dispatch:
schedule:
- cron: "0 5 * * MON"
push:
branches:
- release
- master
paths:
- "deploy/docker/base.dockerfile"
jobs:
build-docker:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- name: Checkout the head commit of the branch
uses: actions/checkout@v4
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Get tag
id: tag
run: |
tag="${GITHUB_REF_NAME//\//-}"
if [[ "$tag" == master ]]; then
tag=nightly
fi
echo "tag=$tag" >> "$GITHUB_OUTPUT"
- name: Set up Depot CLI
uses: depot/setup-action@v1
- name: Build and push base image
uses: depot/build-push-action@v1
with:
project: ${{ secrets.DEPOT_PROJECT_ID }}
context: .
file: deploy/docker/base.dockerfile
push: true
pull: true
platforms: linux/arm64,linux/amd64
tags: |
${{ vars.DOCKER_HUB_ORGANIZATION }}/base-${{ vars.EDITION }}:${{ steps.tag.outputs.tag }}
env:
DEPOT_TOKEN: ${{ secrets.DEPOT_TOKEN }}