Fix branch names in CI

This commit is contained in:
David Baker 2023-06-26 13:37:31 +01:00
parent aed1548929
commit d57bb5bb76
4 changed files with 8 additions and 9 deletions

View file

@ -2,7 +2,7 @@ name: Build
on: on:
pull_request: {} pull_request: {}
push: push:
branches: [main] branches: [livekit]
jobs: jobs:
build: build:
name: Build name: Build

View file

@ -5,7 +5,7 @@ on:
types: types:
- completed - completed
branches-ignore: branches-ignore:
- "main" - "livekit"
jobs: jobs:
e2e: e2e:
name: E2E tests runs on Element Call name: E2E tests runs on Element Call

View file

@ -5,7 +5,7 @@ on:
types: types:
- completed - completed
branches: branches:
- "main" - "full-mesh"
jobs: jobs:
deploy: deploy:
@ -16,7 +16,7 @@ jobs:
# so we need to check the head repo too in order to not run on PRs from forks # so we need to check the head repo too in order to not run on PRs from forks
# We check the branch name again too just for completeness # We check the branch name again too just for completeness
# (Is there a nicer way to see if a PR is from a fork?) # (Is there a nicer way to see if a PR is from a fork?)
if: github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_repository.full_name == 'vector-im/element-call' && github.event.workflow_run.head_branch == 'main' if: github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_repository.full_name == 'vector-im/element-call' && github.event.workflow_run.head_branch == 'full-mesh'
steps: steps:
- name: Create Deployment - name: Create Deployment
uses: bobheadxi/deployments@v1 uses: bobheadxi/deployments@v1

View file

@ -1,11 +1,11 @@
name: Netlify LiveKit Experiment name: Netlify LiveKit
on: on:
workflow_run: workflow_run:
workflows: ["Build"] workflows: ["Build"]
types: types:
- completed - completed
branches: branches:
- "livekit-experiment" - "livekit"
jobs: jobs:
deploy: deploy:
@ -16,7 +16,7 @@ jobs:
# so we need to check the head repo too in order to not run on PRs from forks # so we need to check the head repo too in order to not run on PRs from forks
# We check the branch name again too just for completeness # We check the branch name again too just for completeness
# (Is there a nicer way to see if a PR is from a fork?) # (Is there a nicer way to see if a PR is from a fork?)
if: github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_repository.full_name == 'vector-im/element-call' && github.event.workflow_run.head_branch == 'livekit-experiment' if: github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_repository.full_name == 'vector-im/element-call' && github.event.workflow_run.head_branch == 'livekit'
steps: steps:
- name: Create Deployment - name: Create Deployment
uses: bobheadxi/deployments@v1 uses: bobheadxi/deployments@v1
@ -64,12 +64,11 @@ jobs:
with: with:
publish-dir: dist publish-dir: dist
deploy-message: "Deploy from GitHub Actions" deploy-message: "Deploy from GitHub Actions"
production-branch: livekit-experiment production-branch: livekit
production-deploy: true production-deploy: true
# These don't work because we're in workflow_run # These don't work because we're in workflow_run
enable-pull-request-comment: false enable-pull-request-comment: false
enable-commit-comment: false enable-commit-comment: false
github-deployment-environment: livekit-experiment
env: env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: e3b9fa82-c040-4db6-b4bf-42b524d57423 NETLIFY_SITE_ID: e3b9fa82-c040-4db6-b4bf-42b524d57423