diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index afec0e0..ec854c8 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -119,17 +119,20 @@ jobs: run: echo "Image pushed to ${{ steps.push-to-ghcr.outputs.digest }}" - name: Get OIDC token + 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.event_name != 'pull_request' }} with: method: kubeconfig kubeconfig: "${{ secrets.KUBECONFIG }}" - name: Deploy the image + 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@${{ steps.push-to-ghcr.outputs.digest }} dependency-submission: