mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-09-06 08:50:50 +08:00
Merge pull request #52 from toeverything/chore/update-ci
chore: change main branch master -> main; add branch develop for test…
This commit is contained in:
@@ -1,10 +1,10 @@
|
|||||||
name: Build Community Version
|
name: Build Pathfinder Community Version
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [master]
|
branches: [main]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [master]
|
branches: [main]
|
||||||
|
|
||||||
# Cancels all previous workflow runs for pull requests that have not completed.
|
# Cancels all previous workflow runs for pull requests that have not completed.
|
||||||
# See https://docs.github.com/en/actions/using-jobs/using-concurrency
|
# See https://docs.github.com/en/actions/using-jobs/using-concurrency
|
||||||
@@ -70,7 +70,7 @@ jobs:
|
|||||||
push_to_registry:
|
push_to_registry:
|
||||||
# See https://docs.github.com/en/actions/publishing-packages/publishing-docker-images
|
# See https://docs.github.com/en/actions/publishing-packages/publishing-docker-images
|
||||||
name: Push Docker image to Docker Hub
|
name: Push Docker image to Docker Hub
|
||||||
if: github.ref == 'refs/heads/master'
|
if: github.ref == 'refs/heads/main'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: build
|
needs: build
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
name: Build LiveDemo Version
|
name: Build Pathfinder LiveDemo Version
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [master]
|
branches: [main]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [master]
|
branches: [main]
|
||||||
|
|
||||||
# Cancels all previous workflow runs for pull requests that have not completed.
|
# Cancels all previous workflow runs for pull requests that have not completed.
|
||||||
# See https://docs.github.com/en/actions/using-jobs/using-concurrency
|
# See https://docs.github.com/en/actions/using-jobs/using-concurrency
|
||||||
@@ -72,7 +72,7 @@ jobs:
|
|||||||
push_to_registry:
|
push_to_registry:
|
||||||
# See https://docs.github.com/en/actions/publishing-packages/publishing-docker-images
|
# See https://docs.github.com/en/actions/publishing-packages/publishing-docker-images
|
||||||
name: Push Docker image to Docker Hub
|
name: Push Docker image to Docker Hub
|
||||||
if: github.ref == 'refs/heads/master'
|
if: github.ref == 'refs/heads/main'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: build
|
needs: build
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
name: Build LiveDemo Test Version
|
name: Build Pathfinder LiveDemo Test Version
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
@@ -7,6 +7,8 @@ on:
|
|||||||
description: "Custom Tag. Set nightly-latest will publish to development."
|
description: "Custom Tag. Set nightly-latest will publish to development."
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
|
push:
|
||||||
|
branches: [develop]
|
||||||
|
|
||||||
# Cancels all previous workflow runs for pull requests that have not completed.
|
# Cancels all previous workflow runs for pull requests that have not completed.
|
||||||
# See https://docs.github.com/en/actions/using-jobs/using-concurrency
|
# See https://docs.github.com/en/actions/using-jobs/using-concurrency
|
||||||
@@ -85,7 +87,7 @@ jobs:
|
|||||||
REGISTRY: ghcr.io
|
REGISTRY: ghcr.io
|
||||||
IMAGE_NAME: ${{ github.repository }}-testing
|
IMAGE_NAME: ${{ github.repository }}-testing
|
||||||
IMAGE_TAG: canary-${{ github.sha }}
|
IMAGE_TAG: canary-${{ github.sha }}
|
||||||
# IMAGE_TAG_LATEST: nightly-latest
|
IMAGE_TAG_LATEST: nightly-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Check out the repo
|
- name: Check out the repo
|
||||||
@@ -111,7 +113,7 @@ jobs:
|
|||||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||||
tags: |
|
tags: |
|
||||||
${{ env.IMAGE_TAG }}
|
${{ env.IMAGE_TAG }}
|
||||||
${{ inputs.tag || github.ref_name }}
|
${{ inputs.tag || (github.ref_name == 'develop' && env.IMAGE_TAG_LATEST) || github.ref_name }}
|
||||||
|
|
||||||
- name: Build and push Docker image
|
- name: Build and push Docker image
|
||||||
uses: docker/build-push-action@v3
|
uses: docker/build-push-action@v3
|
||||||
|
|||||||
Reference in New Issue
Block a user