Skip to content

Commit

Permalink
verify token is functional when fetching secrets from another github …
Browse files Browse the repository at this point in the history
…environment
  • Loading branch information
rikukissa committed Aug 26, 2024
1 parent 0de8f0b commit e9dbd9d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/get-secret-from-environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,17 @@ jobs:
exit 1
fi
- name: Verify GitHub token validity
id: verify-token
run: |
RESPONSE=$(curl -s -o /dev/null -w "%{http_code}" -H "Authorization: Bearer ${{ secrets.gh_token }}" \
"https://api.github.com/user")
if [ "$RESPONSE" -ne 200 ]; then
echo "Invalid or expired GitHub token."
exit 1
fi
echo "GitHub token is valid."
- name: Check if environment exists
id: check-env
run: |
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ INSERT CSV ROWS IN ENGLISH ONLY

### New features

- Environment creator script now requires countries to provide a Github token with no expiry date. This is reduce effort in keeping the token up to date.
- Certificate handlebar for registration fees `registrationFees` [#6817](https://github.com/opencrvs/opencrvs-core/issues/6817)
- Logged in user details handlebar `loggedInUser` [#6529](https://github.com/opencrvs/opencrvs-core/issues/6529)
- Supporting document fields can now be made required
Expand Down

0 comments on commit e9dbd9d

Please sign in to comment.