Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't try to deploy the image from a PR #45

Merged
merged 1 commit into from
Sep 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Loading