2023-06-07 01:05:57 +12:00
|
|
|
name: "Build and Publish"
|
2023-06-06 22:01:35 +12:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- feat-db-pools-master
|
|
|
|
tags:
|
|
|
|
|
|
|
|
jobs:
|
2023-06-06 22:03:22 +12:00
|
|
|
build-publish:
|
|
|
|
name: Build and Publish
|
2023-06-06 22:01:35 +12:00
|
|
|
runs-on: ubuntu-latest
|
2023-06-06 22:03:22 +12:00
|
|
|
if: startsWith(github.ref, 'refs/tags/')
|
2023-06-06 22:01:35 +12:00
|
|
|
|
|
|
|
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 }}
|
|
|
|
|
2023-06-06 22:03:22 +12:00
|
|
|
- name: Build & Publish to DockerHub
|
2023-06-06 22:01:35 +12:00
|
|
|
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 }}
|