Skip to content

Commit

Permalink
Update Image in Cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
fwilhe committed Sep 23, 2024
1 parent af46802 commit 403b7f3
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ on:
permissions:
contents: read
pages: write
# This is required for requesting the JWT
id-token: write
# Push container images
packages: write
Expand Down Expand Up @@ -117,6 +118,20 @@ jobs:
if: ${{ github.event_name != 'pull_request' }}
run: echo "Image pushed to ${{ steps.push-to-ghcr.outputs.digest }}"

- name: Get OIDC token
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
with:
method: kubeconfig
kubeconfig: "${{ secrets.KUBECONFIG }}"

- name: Deploy the image
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:

runs-on: ubuntu-24.04
Expand Down

0 comments on commit 403b7f3

Please sign in to comment.