Skip to content

test: temporary COPR secret auth check #1

test: temporary COPR secret auth check

test: temporary COPR secret auth check #1

name: COPR secret test (temporary)
# Throwaway workflow: verifies COPR_API_TOKEN authenticates to COPR in a real
# runner, read-only. Delete this file and branch after use.
on:
push:
branches: [tmp/copr-secret-test]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Authenticate to COPR with the secret
env:
COPR_API_TOKEN: ${{ secrets.COPR_API_TOKEN }}
run: |
if [ -z "$COPR_API_TOKEN" ]; then
echo "::error::COPR_API_TOKEN is empty in this run."
exit 1
fi
mkdir -p ~/.config
printf '%s\n' "$COPR_API_TOKEN" > ~/.config/copr
chmod 600 ~/.config/copr
pipx install copr-cli
echo "=== whoami (proves the token authenticates) ==="
copr-cli whoami
echo "=== projects under giswqs (proves geolibre is reachable) ==="
copr-cli list giswqs
echo "COPR authentication with the GitHub secret succeeded."