Skip to content

Commit

Permalink
[GH-163] replace the deprecated 'set-output' with GITHUB_OUTPUT (#164)
Browse files Browse the repository at this point in the history
* replace all other instances of set-output
  • Loading branch information
goulter authored Jan 17, 2023
1 parent ad26acc commit ef5ea2b
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions .github/steps/create-release/is-release-required.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ current_version=$(get_poetry_version)
latest_release=$(curl -s https://api.github.com/repos/UWIT-IAM/uw-husky-directory/releases | jq '.[0].tag_name')
latest_release=$(echo "${latest_release}" | sed 's|"||g')

echo "::set-output name=version::${current_version}"
echo "::set-output name=latest-release::${latest_release}"
echo "version=${current_version}" >> $GITHUB_OUTPUT
echo "latest-release=${latest_release}" >> $GITHUB_OUTPUT
if [[ "${current_version}" == "${latest_release}" && "${GITHUB_REF}" == "refs/heads/main" ]]
then
echo "::set-output name=release-required::false"
echo "release-required=false" >> $GITHUB_OUTPUT
else
echo "::set-output name=release-required::true"
echo "release-required=true" >> $GITHUB_OUTPUT
fi
4 changes: 2 additions & 2 deletions .github/steps/deploy/configure-canvas.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ canvas=$(${STEP_SCRIPTS}/get_slack_notification.sh \
-q "${deployment_qualifier}" \
-c "#iam-bot-sandbox") # TODO

echo "::set-output name=slack-canvas::$(echo $canvas)"
echo "slack-canvas=$(echo $canvas)" >> $GITHUB_OUTPUT
echo "Slack canvas json: $canvas"

context_artifact=$(${STEP_SCRIPTS}/get_slack_notification.sh \
Expand All @@ -16,7 +16,7 @@ context_artifact=$(${STEP_SCRIPTS}/get_slack_notification.sh \
-s "$target_cluster" \
-q "${deployment_qualifier}")

echo "::set-output name=context-artifact::$(echo $context_artifact)"
echo "context-artifact=$(echo $context_artifact)" >> $GITHUB_OUTPUT
echo "Context artifact: $context_artifact"

set -e
Expand Down
2 changes: 1 addition & 1 deletion .github/steps/pull-request/create-pr-tag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,5 @@ tag_name="pull-request-${pr_number}"
dest_image="${DOCKER_REPOSITORY}.app:${tag_name}"
docker tag "${source_image}" ${dest_image}
docker push "${dest_image}"
echo "::set-output name=image::${dest_image}"
echo "image=${dest_image}" >> $GITHUB_OUTPUT
echo "::notice::Pushed image https://${dest_image}"
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:
else
target_version=$(./scripts/get-deployed-version.sh -s ${source_stage})
fi
echo "::set-output name=target-version::${target_version}"
echo "target-version=${target_version}" >> $GITHUB_OUTPUT
# For shared instances (dev, eval, prod) we create a slack notification
# so that others can be aware of the change.
# TODO: Eval and prod deployment notifications should go to #iam-uwnetid
Expand Down Expand Up @@ -117,7 +117,7 @@ jobs:
id: audit
run: |
slack_link="<${{ env.rfc }} | Audit Record>"
echo "::set-output name=context::[${slack_link}]"
echo "context=[${slack_link}]" >> $GITHUB_OUTPUT
# If we have a Slack notification for this change, add a context artifact to it.
# This provides at-a-glance links and details in the slack notification for
Expand Down
4 changes: 2 additions & 2 deletions scripts/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ function configure_deployment {
fi
if [[ -n "${GITHUB_REF}" ]]
then
echo "::set-output name=target-cluster::$target_cluster"
echo "::set-output name=target-version::$deploy_version"
echo "target-cluster=$target_cluster" >> $GITHUB_OUTPUT
echo "target-version=$deploy_version" >> $GITHUB_OUTPUT
fi
}

Expand Down

0 comments on commit ef5ea2b

Please sign in to comment.