Skip to content

Commit

Permalink
Replace set-output in Github Actions (close #305)
Browse files Browse the repository at this point in the history
  • Loading branch information
benjben committed Apr 4, 2023
1 parent e1c74cc commit 54d7622
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/cookieless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ jobs:
id: non-anonymous
run: |
output=$(curl -X POST -i http://0.0.0.0:12345/com.snowplowanalytics.snowplow/tp2 -d '{}' 2>&1 | grep -q 'Set-Cookie')
echo "::set-output name=exit_code::$?"
echo "exit_code=$?" >> $GITHUB_OUTPUT
- name: Test anonymous tracking
id: anonymous
if: ${{ steps.non-anonymous.outputs.exit_code == 0 }}
run: |
set +e
output=$(curl -X POST -i http://0.0.0.0:12345/com.snowplowanalytics.snowplow/tp2 -H 'SP-Anonymous: *' -d '{}' 2>&1 | grep -q 'Set-Cookie')
echo "::set-output name=exit_code::$?"
echo "exit_code=$?" >> $GITHUB_OUTPUT
- name: Report outcome
if: ${{ steps.non-anonymous.outputs.exit_code == 0 && steps.anonymous.outputs.exit_code == 1 }}
run: echo "All tests successful!"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
id: ver
run: |
export PROJECT_VERSION=$(sbt "project core" version -Dsbt.log.noformat=true | perl -ne 'print "$1\n" if /info.*(\d+\.\d+\.\d+[^\r\n]*)/' | tail -n 1 | tr -d '\n')
echo "::set-output name=project_version::$PROJECT_VERSION"
echo "project_version=$PROJECT_VERSION" >> $GITHUB_OUTPUT
- name: Create GitHub release and attach artifacts
uses: softprops/action-gh-release@v1
with:
Expand Down Expand Up @@ -80,7 +80,7 @@ jobs:
id: ver
run: |
export PROJECT_VERSION=$(sbt "project core" version -Dsbt.log.noformat=true | perl -ne 'print "$1\n" if /info.*(\d+\.\d+\.\d+[^\r\n]*)/' | tail -n 1 | tr -d '\n')
echo "::set-output name=project_version::$PROJECT_VERSION"
echo "project_version=$PROJECT_VERSION" >> $GITHUB_OUTPUT
- name: Stage the Docker build
run: sbt "project ${{ matrix.platform }}" docker:stage
Expand Down

0 comments on commit 54d7622

Please sign in to comment.