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:
Qi 2022-10-25 11:20:00 +08:00 committed by GitHub
commit 5a9a60688c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 11 deletions

View File

@ -1,10 +1,10 @@
name: Build Community Version
name: Build Pathfinder Community Version
on:
push:
branches: [master]
branches: [main]
pull_request:
branches: [master]
branches: [main]
# Cancels all previous workflow runs for pull requests that have not completed.
# See https://docs.github.com/en/actions/using-jobs/using-concurrency
@ -70,7 +70,7 @@ jobs:
push_to_registry:
# See https://docs.github.com/en/actions/publishing-packages/publishing-docker-images
name: Push Docker image to Docker Hub
if: github.ref == 'refs/heads/master'
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
needs: build

View File

@ -1,10 +1,10 @@
name: Build LiveDemo Version
name: Build Pathfinder LiveDemo Version
on:
push:
branches: [master]
branches: [main]
pull_request:
branches: [master]
branches: [main]
# Cancels all previous workflow runs for pull requests that have not completed.
# See https://docs.github.com/en/actions/using-jobs/using-concurrency
@ -72,7 +72,7 @@ jobs:
push_to_registry:
# See https://docs.github.com/en/actions/publishing-packages/publishing-docker-images
name: Push Docker image to Docker Hub
if: github.ref == 'refs/heads/master'
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
needs: build

View File

@ -1,4 +1,4 @@
name: Build LiveDemo Test Version
name: Build Pathfinder LiveDemo Test Version
on:
workflow_dispatch:
@ -7,6 +7,8 @@ on:
description: "Custom Tag. Set nightly-latest will publish to development."
required: false
type: string
push:
branches: [develop]
# Cancels all previous workflow runs for pull requests that have not completed.
# See https://docs.github.com/en/actions/using-jobs/using-concurrency
@ -85,7 +87,7 @@ jobs:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}-testing
IMAGE_TAG: canary-${{ github.sha }}
# IMAGE_TAG_LATEST: nightly-latest
IMAGE_TAG_LATEST: nightly-latest
steps:
- name: Check out the repo
@ -111,7 +113,7 @@ jobs:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
${{ 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
uses: docker/build-push-action@v3