mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
708aea2532
Pin every third-party action in .github/workflows/ to a full commit SHA with a trailing version comment, and bump to the latest stable release. Defends against tag-rewrite supply-chain attacks while keeping versions legible.
53 lines
1.5 KiB
YAML
53 lines
1.5 KiB
YAML
name: "Build and Publish Appwrite Images for Cloud"
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- cl-*
|
|
|
|
jobs:
|
|
build-publish:
|
|
name: Build and Publish
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
fetch-depth: 2
|
|
submodules: recursive
|
|
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4.0.0
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
|
|
|
|
- name: Login to Docker Hub
|
|
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
|
|
with:
|
|
username: ${{ vars.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
- name: Extract metadata (tags, labels) for Docker
|
|
id: meta
|
|
uses: docker/metadata-action@030e881283bb7a6894de51c315a6bfe6a94e05cf # v6.0.0
|
|
with:
|
|
images: appwrite/cloud
|
|
tags: |
|
|
type=ref,event=tag
|
|
|
|
- name: Build & Publish to DockerHub
|
|
uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7.1.0
|
|
with:
|
|
context: .
|
|
platforms: linux/amd64,linux/arm64
|
|
target: production
|
|
build-args: |
|
|
VERSION=${{ steps.meta.outputs.version }}
|
|
VITE_APPWRITE_GROWTH_ENDPOINT=https://growth.appwrite.io/v1
|
|
VITE_GA_PROJECT=G-L7G2B6PLDS
|
|
VITE_CONSOLE_MODE=cloud
|
|
push: true
|
|
tags: ${{ steps.meta.outputs.tags }}
|