Skip to content

Commit

Permalink
Deprecate set-output directive (TykTechnologies#4560)
Browse files Browse the repository at this point in the history
## Description

Deprecated github CI directives

## Related Issue

https://tyktech.atlassian.net/browse/TD-1269
  • Loading branch information
ermirizio authored Dec 21, 2022
1 parent 3ea23a2 commit 05918db
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/api-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ jobs:
env:
TOKEN: '${{ secrets.ORG_GH_TOKEN }}'
run: |
echo "::set-output name=branch::master"
echo "branch=master" >> $GITHUB_OUTPUT
if [ ! -z "${{ github.head_ref }}" ] && git ls-remote --exit-code --heads https://${TOKEN}@github.com/TykTechnologies/tyk-automated-tests ${{ github.head_ref }}; then
echo "::set-output name=branch::${{ github.head_ref }}"
echo "branch=${{ github.head_ref }}" >> $GITHUB_OUTPUT
fi
if [ ! -z "${{ github.base_ref }}" ] && git ls-remote --exit-code --heads https://${TOKEN}@github.com/TykTechnologies/tyk-automated-tests ${{ github.base_ref }}; then
echo "::set-output name=branch::${{ github.base_ref }}"
echo "branch=${{ github.base_ref }}" >> $GITHUB_OUTPUT
fi
if [ ! -z "${{ github.ref }}" ] && git ls-remote --exit-code --heads https://${TOKEN}@github.com/TykTechnologies/tyk-automated-tests ${{ github.ref }}; then
echo "::set-output name=branch::${{ github.ref }}"
echo "branch=${{ github.ref }}" >> $GITHUB_OUTPUT
fi
- name: Checkout test repository
Expand All @@ -69,15 +69,15 @@ jobs:
env:
TOKEN: '${{ secrets.ORG_GH_TOKEN }}'
run: |
echo "::set-output name=branch::master"
echo "branch=master" >> $GITHUB_OUTPUT
if [ ! -z "${{ github.head_ref }}" ] && git ls-remote --exit-code --heads https://${TOKEN}@github.com/TykTechnologies/tyk-analytics ${{ github.head_ref }}; then
echo "::set-output name=branch::${{ github.head_ref }}"
echo "branch=${{ github.head_ref }}" >> $GITHUB_OUTPUT
fi
if [ ! -z "${{ github.base_ref }}" ] && git ls-remote --exit-code --heads https://${TOKEN}@github.com/TykTechnologies/tyk-analytics ${{ github.base_ref }}; then
echo "::set-output name=branch::${{ github.base_ref }}"
echo "branch=${{ github.base_ref }}" >> $GITHUB_OUTPUT
fi
if [ ! -z "${{ github.ref }}" ] && git ls-remote --exit-code --heads https://${TOKEN}@github.com/TykTechnologies/tyk-analytics ${{ github.ref }}; then
echo "::set-output name=branch::${{ github.ref }}"
echo "branch=${{ github.ref }}" >> $GITHUB_OUTPUT
fi
- name: Checkout dashboard
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
git add --all
git diff HEAD > git-state.log
echo "::set-output name=git-state::$(sed -ze 's/%/%25/g;s/\n/%0A/g' git-state.log)"
echo "git-state=$(sed -ze 's/%/%25/g;s/\n/%0A/g' git-state.log)" >> $GITHUB_OUTPUT
git_state_count=$(wc -l < git-state.log)
Expand Down Expand Up @@ -84,7 +84,7 @@ jobs:
run: |
./bin/ci-tests.sh 2>&1 | tee test.log
result_code=${PIPESTATUS[0]}
echo "::set-output name=log::$(sed -ze 's/%/%25/g;s/\n/%0A/g' test.log)"
echo "log=$(sed -ze 's/%/%25/g;s/\n/%0A/g' test.log)" >> $GITHUB_OUTPUT
exit $result_code
- name: Notify status
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ jobs:
run: |
ci/bin/unlock-agent.sh
current_tag=${GITHUB_REF##*/}
echo "::set-output name=tag::${current_tag}"
echo "tag=${current_tag}" >> $GITHUB_OUTPUT
- name: Delete old release assets
if: startsWith(github.ref, 'refs/tags')
Expand Down Expand Up @@ -177,9 +177,9 @@ jobs:
eval $(terraform output -json tyk | jq -r 'to_entries[] | [.key,.value] | join("=")')
region=$(terraform output region | xargs)
[ -z "$key" -o -z "$secret" -o -z "$region" ] && exit 1
echo "::set-output name=secret::$secret"
echo "::set-output name=key::$key"
echo "::set-output name=region::$region"
echo "secret=$secret" >> $GITHUB_OUTPUT
echo "key=$key" >> $GITHUB_OUTPUT
echo "region=$region" >> $GITHUB_OUTPUT
- name: Configure AWS credentials for use
uses: aws-actions/configure-aws-credentials@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sync-automation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
git restore --source master -- .github/workflows/api-tests.yml
git add -A && git commit -m "[CI]: Syncing CI changes to ${{ matrix.branch }}"
git push origin $prbranch
echo "::set-output name=prbranch::$prbranch"
echo "prbranch=$prbranch" >> $GITHUB_OUTPUT
echo "::debug::Commit ${{ github.sha }} syncd for ${{matrix.branch}}"
exit 0
Expand Down

0 comments on commit 05918db

Please sign in to comment.