|
| 1 | +name: "Update ENI max pods" |
| 2 | +on: |
| 3 | + workflow_dispatch: |
| 4 | + schedule: |
| 5 | + # Every Monday at 9AM PST |
| 6 | + - cron: "0 17 * * 1" |
| 7 | +permissions: |
| 8 | + id-token: write |
| 9 | + contents: write |
| 10 | + pull-requests: write |
| 11 | +jobs: |
| 12 | + update-eni-max-pods: |
| 13 | + if: github.repository == 'bottlerocket-os/bottlerocket-core-kit' |
| 14 | + timeout-minutes: 10 |
| 15 | + runs-on: ubuntu-latest |
| 16 | + steps: |
| 17 | + - name: Configure credentials |
| 18 | + uses: aws-actions/configure-aws-credentials@7474bc4690e29a8392af63c5b98e7449536d5c3a # 4.3.1 |
| 19 | + with: |
| 20 | + aws-region: ${{ secrets.ENI_MAX_PODS_UPDATER_REGION }} |
| 21 | + role-to-assume: ${{ secrets.ENI_MAX_PODS_UPDATER_ROLE_ARN }} |
| 22 | + role-duration-seconds: 900 # 15 minutes |
| 23 | + |
| 24 | + - name: Checkout bottlerocket-core-kit |
| 25 | + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 5.0.0 |
| 26 | + with: |
| 27 | + repository: bottlerocket-os/bottlerocket-core-kit |
| 28 | + ref: refs/heads/develop |
| 29 | + path: bottlerocket-core-kit/ |
| 30 | + |
| 31 | + - name: Checkout amazon-vpc-cni-k8s |
| 32 | + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 5.0.0 |
| 33 | + with: |
| 34 | + repository: aws/amazon-vpc-cni-k8s |
| 35 | + ref: refs/heads/master |
| 36 | + path: amazon-vpc-cni-k8s/ |
| 37 | + |
| 38 | + - name: Run generation script and copy output |
| 39 | + run: | |
| 40 | + cd amazon-vpc-cni-k8s/ |
| 41 | + make generate-limits |
| 42 | + cp misc/eni-max-pods.txt ../bottlerocket-core-kit/packages/os/eni-max-pods |
| 43 | +
|
| 44 | + - name: Create pull request |
| 45 | + uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # 7.0.8 |
| 46 | + with: |
| 47 | + branch: update-eni-max-pods |
| 48 | + path: bottlerocket-core-kit/ |
| 49 | + base: develop |
| 50 | + delete-branch: true |
| 51 | + add-paths: | |
| 52 | + packages/os/eni-max-pods |
| 53 | + commit-message: "Update eni-max-pods" |
| 54 | + committer: "GitHub <[email protected]>" |
| 55 | + author: "GitHub <[email protected]>" |
| 56 | + title: "Update eni-max-pods" |
| 57 | + body: | |
| 58 | + Generated by [aws/amazon-vpc-cni-k8s](https://github.com/aws/amazon-vpc-cni-k8s): |
| 59 | + ``` |
| 60 | + make generate-limits |
| 61 | + ``` |
0 commit comments