mirror of
https://github.com/logto-io/logto.git
synced 2024-12-16 20:26:19 -05:00
50 lines
1.2 KiB
YAML
50 lines
1.2 KiB
YAML
|
name: Release Cloud
|
||
|
|
||
|
on:
|
||
|
workflow_dispatch:
|
||
|
push:
|
||
|
branches:
|
||
|
- master
|
||
|
|
||
|
concurrency:
|
||
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||
|
|
||
|
jobs:
|
||
|
dockerize:
|
||
|
environment: ${{ startsWith(github.ref, 'refs/tags/') && 'release' || '' }}
|
||
|
runs-on: ubuntu-latest
|
||
|
|
||
|
steps:
|
||
|
- uses: actions/checkout@v3
|
||
|
with:
|
||
|
fetch-depth: 0
|
||
|
|
||
|
- name: Docker meta
|
||
|
id: meta
|
||
|
uses: docker/metadata-action@v4
|
||
|
with:
|
||
|
images: |
|
||
|
ghcr.io/logto-io/cloud
|
||
|
# https://github.com/docker/metadata-action#typesemver
|
||
|
tags: |
|
||
|
type=edge
|
||
|
|
||
|
- name: Login to GitHub Container Registry
|
||
|
uses: docker/login-action@v2
|
||
|
with:
|
||
|
registry: ghcr.io
|
||
|
username: silverhand-bot
|
||
|
password: ${{ secrets.BOT_PAT }}
|
||
|
|
||
|
- name: Setup Docker Buildx
|
||
|
uses: docker/setup-buildx-action@v2
|
||
|
|
||
|
- name: Build and push
|
||
|
uses: docker/build-push-action@v4
|
||
|
with:
|
||
|
file: Dockerfile.cloud
|
||
|
context: .
|
||
|
push: true
|
||
|
tags: ${{ steps.meta.outputs.tags }}
|
||
|
labels: ${{ steps.meta.outputs.labels }}
|