Skip to content

Commit

Permalink
Replace deprecated command set-output
Browse files Browse the repository at this point in the history
  • Loading branch information
sgiovacchini committed Oct 28, 2024
1 parent 3dd5020 commit 9faf9eb
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Extract building params
id: building-params
run: |
echo "::set-output name=environment::production"
echo "environment=production" >> $GITHUB_OUTPUT
- name: Analyze JSON Package
id: package_json
Expand All @@ -29,7 +29,7 @@ jobs:
content="${content//'%'/'%25'}"
content="${content//$'\n'/'%0A'}"
content="${content//$'\r'/'%0D'}"
echo "::set-output name=packageJson::$content"
echo "packageJson=$content" >> $GITHUB_OUTPUT
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
Expand All @@ -50,9 +50,9 @@ jobs:
export IMAGE="$ECR_REGISTRY/sanctuary"
export GIT_COMMIT_VERSION=$(git rev-parse main | cut -c1-8)
export DATE=$(date +%s)
echo "::set-output name=image::$IMAGE"
echo "::set-output name=commit_version::$(echo ${GIT_COMMIT_VERSION}_${DATE})"
echo "::set-output name=version::${{fromJson(steps.package_json.outputs.packageJson).version}}"
echo "image=$IMAGE" >> $GITHUB_OUTPUT
echo "commit_version=$(echo ${GIT_COMMIT_VERSION}_${DATE})" >> $GITHUB_OUTPUT
echo "version=${{fromJson(steps.package_json.outputs.packageJson).version}}" >> $GITHUB_OUTPUT
- name: Build, tag, and push image to Amazon ECR
env:
Expand Down Expand Up @@ -170,10 +170,10 @@ jobs:
BUILD_ID=$(cat build-id.txt)
rm -rf version.txt environment.txt build-id.txt
IMAGE="$IMAGE_ECR:$VERSION"
echo "::set-output name=version::$VERSION"
echo "::set-output name=environment::$BUILDING_ENVIRONMENT"
echo "::set-output name=build-id::$BUILD_ID"
echo "::set-output name=image::$IMAGE"
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "environment=$BUILDING_ENVIRONMENT" >> $GITHUB_OUTPUT
echo "build-id=$BUILD_ID" >> $GITHUB_OUTPUT
echo "image=$IMAGE" >> $GITHUB_OUTPUT
- name: Update GitOps Sandbox repository
env:
Expand Down

0 comments on commit 9faf9eb

Please sign in to comment.