fix #295
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PR | |
on: | |
workflow_call: | |
secrets: | |
ftrackApiKey: | |
description: "The API key to the ftrack instance" | |
required: true | |
token: | |
description: "The GitHub token" | |
required: true | |
pull_request: | |
types: | |
- opened | |
- edited | |
- closed | |
push: | |
tags: | |
- "v*" | |
release: | |
deployment: | |
jobs: | |
check-pr: | |
timeout-minutes: 5 | |
name: Check PR & Sync | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Dump GitHub context" | |
env: | |
GITHUB_CONTEXT: ${{ toJson(github) }} | |
run: echo "$GITHUB_CONTEXT" | |
# required so we can reference the actions locally | |
- name: Checkout workflows repo | |
uses: actions/checkout@v3 | |
with: | |
# you can set this to your branch when modifying actions and want too assert that it works | |
# ref: bunify | |
path: workflows | |
repository: ftrackhq/ftrack-actions | |
token: ${{ secrets.token || secrets.GITHUB_TOKEN }} | |
- name: Create change request object | |
uses: ./workflows/actions/ftrack-sync | |
with: | |
action: "sync-pre-deploy" | |
ftrackUrl: https://dev.ftrackapp.com | |
ftrackLoginEmail: "github_bot@backlight.co" | |
ftrackUserId: "76a40852-359d-11ed-8012-aab5768efa1e" | |
ftrackApiKey: ${{ secrets.ftrackApiKey || secrets.FTRACK_API_KEY }} | |
token: ${{ secrets.token || secrets.GITHUB_TOKEN }} | |
deploy-sync: | |
runs-on: ubuntu-latest | |
environment: production | |
steps: | |
- name: Checkout workflows repo | |
uses: actions/checkout@v3 | |
with: | |
# you can set this to your branch when modifying actions and want too assert that it works | |
# ref: bunify | |
path: workflows | |
repository: ftrackhq/ftrack-actions | |
token: ${{ secrets.token || secrets.GITHUB_TOKEN }} | |
- name: ftrack Sync | |
uses: ./workflows/actions/ftrack-sync | |
with: | |
action: "sync-post-deploy" | |
ftrackUrl: https://dev.ftrackapp.com | |
ftrackLoginEmail: "github_bot@backlight.co" | |
ftrackUserId: "76a40852-359d-11ed-8012-aab5768efa1e" | |
ftrackApiKey: ${{ secrets.ftrackApiKey || secrets.FTRACK_API_KEY }} | |
token: ${{ secrets.token || secrets.GITHUB_TOKEN }} |