trampoline-cx / action-turbo-changed Goto Github PK
View Code? Open in Web Editor NEWGithub Action checking if a workspace changed using Turborepo
License: MIT License
Github Action checking if a workspace changed using Turborepo
License: MIT License
Hi I'm getting the below error trying to supply from: main
to the action:
run failed: failed to resolve packages to run: commit main does not exist
Per the documentation, I should be able to swap HEAD^1
with main
and it should just work.
This is the (reusable) workflow:
on:
workflow_call:
inputs:
workspace:
required: true
type: string
jobs:
check_changes:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0 # Necessary so we have commit history to compare to
- name: Did ${{ inputs.workspace }} change?
id: changed
uses: Trampoline-CX/action-turbo-changed@v1
with:
workspace: ${{ inputs.workspace }}
from: main
feature request: the action should return a list of the packages that have changed as part of the output. This can let the changed packages to be used in down stream jobs via a matrix. @alexbchr
Currenty running the action like this:
- name: App changed in last commit?
id: changedAction
uses: Trampoline-CX/action-turbo-changed@v1
with:
workspace: ${{ inputs.app-name }}
from: HEAD^1
Error from GH Actions: SyntaxError: Unexpected token A in JSON at position 1
Issue likely lies in the turborepo output that now contains the following text followed by the json
Attention:
Turborepo now collects completely anonymous telemetry regarding usage.
This information is used to shape the Turborepo roadmap and prioritize features.
You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
https://turbo.build/repo/docs/telemetry
{... start of json}
Probably requires a change in main.ts
debug(
Output from Turborepo: ${json}
)const parsedOutput = JSON.parse(json)
const changed = parsedOutput.packages.includes(workspace)
Gh action to run successfully
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.