PromucFlow_constructor/.github/workflows/docker-base-image.yml
Shrikant Sharat Kandula fe6ea46024
chore: Use Docker base images to build (#28198)
This will use the Appsmith base image which contains all the downloads
needed, so the image build in daily CI should be much more reliable, and
quite likely much faster.

All workflows have already been updated to use the BASE build argument
to set the base image.

Once this is merged, building the Docker image will fail if `BASE` build
argument is not passed. This is that the base is set explicitly
everywhere to not cause any confusion.

The deleted content has been moved to
8d34a2ac28/deploy/docker/base.dockerfile,
which builds the `base-*:*` images.
2023-10-19 06:58:16 +05:30

52 lines
1.2 KiB
YAML

name: Docker Base Image
on:
workflow_dispatch:
schedule:
- cron: "0 5 * * MON"
jobs:
build-docker:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- name: Checkout the head commit of the branch
uses: actions/checkout@v4
with:
fetch-depth: 0
- 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: Build and push base image
uses: docker/build-push-action@v5
with:
context: .
file: deploy/docker/base.dockerfile
push: true
platforms: linux/arm64,linux/amd64
tags: |
${{ vars.DOCKER_HUB_ORGANIZATION }}/base-${{ vars.EDITION }}:${{ steps.tag.outputs.tag }}