Skip to content

Commit

Permalink
feat: use latest mechanism to set outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
dgschwindturo committed Nov 7, 2022
1 parent 183283b commit 4d4c418
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ jobs:
run: |
mkdir -p cache
echo "Hello World" > cache/hello.txt
echo "::set-output name=success::true"
echo "success=true" >> "$GITHUB_OUTPUT"
- name: Upload cache
id: upload-cache
if: steps.cache.outputs.success != 'true'
Expand All @@ -284,7 +284,7 @@ jobs:
run: |
mkdir -p cache
echo "Hello World" > cache/hello.txt
echo "::set-output name=success::true"
echo "success=true" >> "$GITHUB_OUTPUT"
- name: Upload cache
id: upload-cache-exists
if: steps.cache-exists.outputs.success != 'true'
Expand Down
6 changes: 3 additions & 3 deletions download/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ runs:
# Try to download and handle failure
AWSCMD=${AWSCMD:-aws}
$AWSCMD s3 cp $AWS_CLI_ARGS "$S3URI" "$TMPFILE" || {
echo "::set-output name=success::false"
echo "success=false" >> $GITHUB_OUTPUT
if [[ "${{ inputs.not-found }}" == "ignore" ]]; then
echo "::debug::Artifact not found at $S3URI"
elif [[ "${{ inputs.not-found }}" == "warn" ]]; then
Expand All @@ -99,5 +99,5 @@ runs:
fi
echo "::debug::Contents of artifact path"
echo "$(tree -a "${{ inputs.path }}" 2>&1)"
echo "::set-output name=success::true"
echo "::set-output name=s3uri::$S3URI"
echo "success=true" >> $GITHUB_OUTPUT
echo "s3uri=$S3URI" >> $GITHUB_OUTPUT
6 changes: 3 additions & 3 deletions upload/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ runs:
# Create a unique directory for this particular action run
TMPDIR="$(mktemp -d -p "$RUNNER_TEMP" "actions-s3-artifact/upload.XXXXXXXX")"
echo "::set-output name=tmpdir::$TMPDIR"
echo "tmpdir=$TMPDIR" >> $GITHUB_OUTPUT
echo "::debug::Created temporary directory $TMPDIR"
# Assign the tarball file name for future use
Expand Down Expand Up @@ -84,7 +84,7 @@ runs:
fi
# Output the keyname for use in subsequent steps
echo "::set-output name=tarball::$TMPTAR"
echo "tarball=$TMPTAR" >> $GITHUB_OUTPUT
- name: Configure AWS credentials
if: inputs.aws-access-key-id != '' && inputs.aws-secret-access-key != ''
uses: aws-actions/configure-aws-credentials@v1
Expand Down Expand Up @@ -117,4 +117,4 @@ runs:
$AWSCMD s3 cp "${{ steps.collect.outputs.tarball }}" "$S3URI"
# Output the S3 URL for use in subsequent steps
echo "::set-output name=s3uri::$S3URI"
echo "s3uri=$S3URI" >> $GITHUB_OUTPUT

0 comments on commit 4d4c418

Please sign in to comment.