mirror of
https://github.com/dolthub/dolt.git
synced 2025-12-30 16:12:39 -06:00
/.github/workflows/bump-dependency.yaml: force client auth token before proceeding
This commit is contained in:
23
.github/workflows/bump-dependency.yaml
vendored
23
.github/workflows/bump-dependency.yaml
vendored
@@ -5,7 +5,30 @@ on:
|
||||
types: [ bump-dependency ]
|
||||
|
||||
jobs:
|
||||
auth:
|
||||
name: Authenticate Caller
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Check client token
|
||||
env:
|
||||
PAYLOAD_TOKEN: ${{ github.event.client_payload.token }}
|
||||
EXPECTED_TOKEN: ${{ secrets.CLIENT_AUTH_TOKEN }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
# refuse to proceed without a token
|
||||
if [ -z "${PAYLOAD_TOKEN:-}" ]; then
|
||||
echo "Unauthorized: missing token"
|
||||
exit 1
|
||||
fi
|
||||
# simple equality check; doesn't echo secrets
|
||||
if [ "${PAYLOAD_TOKEN}" != "${EXPECTED_TOKEN}" ]; then
|
||||
echo "Unauthorized: bad token"
|
||||
exit 1
|
||||
fi
|
||||
echo "Caller authenticated"
|
||||
|
||||
get-label:
|
||||
needs: auth
|
||||
name: Get Label
|
||||
outputs:
|
||||
label: ${{ steps.get-label.outputs.label }}
|
||||
|
||||
Reference in New Issue
Block a user