update-dependencies #4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: update-dependencies | |
| on: | |
| schedule: | |
| - cron: '0 2 * * *' | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| id-token: write | |
| jobs: | |
| update-dependencies: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Configure AWS Credentials | |
| uses: aws-actions/configure-aws-credentials@v4 | |
| with: | |
| role-to-assume: ${{ secrets.NARWHAL_AWS_GOVCLOUD_ROLE_TO_ASSUME }} | |
| role-session-name: ${{ github.repository_owner }}_${{ github.event.repository.name }} | |
| aws-region: us-gov-west-1 | |
| role-duration-seconds: 900 | |
| - name: Populate eks addons dependencies file | |
| run: | | |
| LATEST_EKS_CLUSTER_VERSION=$(aws eks describe-cluster-versions --query "clusterVersions | sort_by(@, &clusterVersion) | [-1].clusterVersion" --output text) | |
| aws eks describe-addon-versions --kubernetes-version $LATEST_EKS_CLUSTER_VERSION > dependencies/eks-addons-versions.json | |
| - name: Sign and push changes using graphql | |
| uses: planetscale/[email protected] | |
| with: | |
| commit_message: "Update dependencies" | |
| repo: ${{ github.repository }} | |
| branch: ${{ github.head_ref || github.ref_name }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |