Skip to content

Commit

Permalink
ci: remove use of deprecated set-output command (#938)
Browse files Browse the repository at this point in the history
  • Loading branch information
Seavenly authored Jun 7, 2023
1 parent eb9ffb0 commit 9ef6eb0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/snapshotCompare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ jobs:
- id: setTestPathPatterns
name: Set test path patterns
run: |
echo "::set-output name=testPathPatterns::$(./.github/scripts/getTestPathPatterns.sh)"
echo "testPathPatterns=$(./.github/scripts/getTestPathPatterns.sh)" >> $GITHUB_OUTPUT
- id: setTestConfigs
name: Set test config environment variables
run: |
echo "::set-output name=testConfigs::$(./.github/scripts/getTestConfigs.sh)"
echo "testConfigs=$(./.github/scripts/getTestConfigs.sh)" >> $GITHUB_OUTPUT
compareSnapshots:
name: Compare
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/snapshotUpdate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ jobs:

- id: setTestPathPatterns
run: |
echo "::set-output name=testPathPatterns::$(./.github/scripts/getTestPathPatterns.sh)"
echo "testPathPatterns=$(./.github/scripts/getTestPathPatterns.sh)" >> $GITHUB_OUTPUT
- id: setTestConfigs
name: Set test config environment variables
run: |
echo "::set-output name=testConfigs::$(./.github/scripts/getTestConfigs.sh)"
echo "testConfigs=$(./.github/scripts/getTestConfigs.sh)" >> $GITHUB_OUTPUT
captureMetadata:
name: Capture Metadata
Expand Down Expand Up @@ -82,15 +82,15 @@ jobs:
run: |
if [ -z "$(git status --porcelain)" ]
then
echo "::set-output name=skip::true"
echo "skip=true" >> $GITHUB_OUTPUT
exit 0
fi
ARTIFACT_NAME="snapshot-$(sed 's/\//-/g' <<< '${{ matrix.testPathPattern }}')"
echo "::set-output name=name::$ARTIFACT_NAME"
echo "name=$ARTIFACT_NAME" >> $GITHUB_OUTPUT
ARTIFACT_PATH="snapshots/"
echo "::set-output name=filePath::$ARTIFACT_PATH"
echo "filePath=$ARTIFACT_PATH" >> $GITHUB_OUTPUT
UPDATED_SNAPSHOTS=$(git status --porcelain | grep 'snapshots' | sed -E "s/^.{3}//")
echo "$UPDATED_SNAPSHOTS" | while read -r filePath
Expand Down Expand Up @@ -163,15 +163,15 @@ jobs:
run: |
if [ -z "$(git status --porcelain)" ]
then
echo "::set-output name=skip::true"
echo "skip=true" >> $GITHUB_OUTPUT
exit 0
fi
ARTIFACT_NAME="snapshot-v2-$(sed 's/\//-/g' <<< '${{ matrix.testConfig }}')"
echo "::set-output name=name::$ARTIFACT_NAME"
echo "name=$ARTIFACT_NAME" >> $GITHUB_OUTPUT
ARTIFACT_PATH="snapshotsV2/"
echo "::set-output name=filePath::$ARTIFACT_PATH"
echo "filePath=$ARTIFACT_PATH" >> $GITHUB_OUTPUT
# even though we're not committing files here, this forces git to list full file paths, not folders
git add .
Expand Down

0 comments on commit 9ef6eb0

Please sign in to comment.