From c4ba8d061370cb2eec3151c09b6bd856bdb53ccc Mon Sep 17 00:00:00 2001 From: Nik Ho Date: Tue, 18 Jun 2024 17:23:49 +1200 Subject: [PATCH] fix: switch to using github cli --- .github/scripts/check_team_membership.sh | 15 ++++++++------- .github/workflows/update-version.yml | 2 ++ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/scripts/check_team_membership.sh b/.github/scripts/check_team_membership.sh index 821a4701..5f000fab 100755 --- a/.github/scripts/check_team_membership.sh +++ b/.github/scripts/check_team_membership.sh @@ -5,19 +5,20 @@ set -x USER=$1 TOKEN=$2 -echo "$(curl -L \ +echo "$(gh api \ -H "Accept: application/vnd.github+json" \ - -H "Authorization: Bearer $TOKEN" \ -H "X-GitHub-Api-Version: 2022-11-28" \ - https://api.github.com/orgs/immutable/teams)" + /orgs/immutable/teams)" -echo "$(curl -L \ +echo "$(gh api \ -H "Accept: application/vnd.github+json" \ - -H "Authorization: Bearer $TOKEN" \ -H "X-GitHub-Api-Version: 2022-11-28" \ - https://api.github.com/orgs/immutable/teams/sdk/members)" + /orgs/immutable/teams/sdk/members)" -response=$(curl -L -H "Authorization: Bearer $TOKEN" -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" "https://api.github.com/orgs/immutable/teams/sdk/memberships/codeschwert") +response=$(gh api \ + -H "Accept: application/vnd.github+json" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + /orgs/immutable/teams/sdk/memberships/codeschwert) echo "$response" diff --git a/.github/workflows/update-version.yml b/.github/workflows/update-version.yml index 66de3fe4..708791b5 100644 --- a/.github/workflows/update-version.yml +++ b/.github/workflows/update-version.yml @@ -12,6 +12,8 @@ on: jobs: update: runs-on: ubuntu-latest + env: + GH_TOKEN: ${{ secrets.UNITY_IMMUTABLE_SDK_GITHUB_TOKEN }} steps: - name: Checkout code uses: actions/checkout@v3