From 470c5c27e873023ac5fa322c349e6486aff6317b Mon Sep 17 00:00:00 2001 From: Florian Wilhelm Date: Tue, 29 Oct 2024 12:20:15 +0100 Subject: [PATCH] revert branch condition --- .github/workflows/ci.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 8d50e72..a43b2b1 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -135,20 +135,20 @@ jobs: run: echo "Image pushed to ${{ steps.push-to-ghcr.outputs.digest }}" - name: Get OIDC token - if: ${{ github.ref == 'ref/head/main' }} + if: ${{ github.event_name != 'pull_request' }} id: get-token run: | IDTOKEN=$(curl -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" "$ACTIONS_ID_TOKEN_REQUEST_URL&audience=glvd" | jq -r '.value') echo "idToken=${IDTOKEN}" >> $GITHUB_OUTPUT - uses: azure/k8s-set-context@v4 - if: ${{ github.ref == 'ref/head/main' }} + if: ${{ github.event_name != 'pull_request' }} with: method: kubeconfig kubeconfig: "${{ secrets.KUBECONFIG }}" - name: Deploy the image - if: ${{ github.ref == 'ref/head/main' }} + if: ${{ github.event_name != 'pull_request' }} run: kubectl --namespace default --token "${{ steps.get-token.outputs.idToken }}" set image deploy/glvd glvd-api=ghcr.io/gardenlinux/glvd-api:latest-linuxamd64_bare@${{ steps.bare.outputs.bare-amd64-digest }} dependency-submission: