Skip to content

Commit

Permalink
.github: Remove misleading step from ipsec workflow
Browse files Browse the repository at this point in the history
[ upstream commit ff5ff77 ]

This step makes a query for the cilium/cilium repo on GitHub and then
checks that the field 'private' is set to false. Note that cilium/cilium
is public repository, so 'private' is always set to false. This means
that the check is not validating whether git credentials were removed,
it's just checking whether a public repository is public.

When this step fails, for instance due to occasional ratelimits imposed
by GitHub, *then* it would do a check whether a read-only git fetch
would succeed, which would always succeed because this workflow is not
removing Git/GitHub credentials.

This commit therefore removes the misleading and incorrect step as it's
better to have no check than to have a check that creates the impression
of some property holding in the workflow run.

Signed-off-by: Joe Stringer <joe@cilium.io>
Signed-off-by: gray <greyschwinger@gmail.com>
  • Loading branch information
joestringer authored and julianwiedmann committed Feb 20, 2025
1 parent 7dcf54d commit 590d916
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions .github/workflows/tests-ipsec-upgrade.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -199,24 +199,6 @@ jobs:
ref: ${{ inputs.context-ref || github.sha }}
persist-credentials: false

- name: Check we effectively removed Git credentials
shell: bash
run: |
# For private repositories requiring authentication, check that we
# can no longer fetch from the repository.
if ! curl -L \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"https://api.github.com/repos/${{ github.repository }}" | \
tee /dev/stderr | \
jq --exit-status '.private == false'; then
echo 'Checking whether "git fetch" succeeds'
if git fetch origin HEAD; then
echo "::error::Git credentials not removed, aborting now."
false
fi
fi
- name: Derive stable Cilium installation config
id: cilium-stable-config
if: ${{ steps.vars.outputs.downgrade_version != '' }}
Expand Down

0 comments on commit 590d916

Please sign in to comment.