-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: make turbo-ignore smarter (#1498)
- Loading branch information
1 parent
e097823
commit f5587b6
Showing
28 changed files
with
408 additions
and
234 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: Turbo Ignore | ||
description: Ignore unchanged files in a Vercel deployment | ||
|
||
inputs: | ||
token: | ||
description: "The Vercel token to use for the deployment" | ||
required: true | ||
project: | ||
description: "The project to check for changes" | ||
required: true | ||
environment: | ||
description: "The environment that turbo-ignore is checking against" | ||
default: "preview" | ||
package: | ||
description: "The package to check for changes" | ||
required: true | ||
branch: | ||
description: "The branch to check for changes" | ||
required: false | ||
|
||
outputs: | ||
continue: | ||
value: ${{ steps.ignore.outputs.continue }} | ||
description: "Whether to continue with the deployment or not" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ inputs.branch }} | ||
fetch-depth: 10 | ||
|
||
- uses: ./.github/actions/install | ||
|
||
- name: Ignore unchanged files | ||
shell: bash | ||
id: ignore | ||
run: | | ||
# if ${{ inputs.branch }} is present, then we change the script to --branch=${{ inputs.branch }} | ||
if [ -n "${{ inputs.branch }}" ]; then | ||
pnpm vercel-scripts last-deploy.txt ${{ inputs.project }} --token=${{ inputs.token }} --environment=${{ inputs.environment }} --branch=${{ inputs.branch }} | ||
else | ||
pnpm vercel-scripts last-deploy.txt ${{ inputs.project }} --token=${{ inputs.token }} --environment=${{ inputs.environment }} | ||
fi | ||
if [ ! -f last-deploy.txt ]; then | ||
echo "continue=1" >> $GITHUB_OUTPUT | ||
exit 0 | ||
fi | ||
set +e | ||
pnpx turbo-ignore ${{ inputs.package }} --fallback=$(cat last-deploy.txt) | ||
echo "continue=$?" >> $GITHUB_OUTPUT |
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
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
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
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
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
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
Oops, something went wrong.