Update generated files #293
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 generated files | |
on: | |
workflow_dispatch: {} | |
schedule: | |
- cron: "0 5 * * Thu" | |
permissions: | |
id-token: write | |
env: | |
DEFAULT_BRANCH: main | |
jobs: | |
update_generated_file: | |
if: github.event.repository.fork == false | |
strategy: | |
fail-fast: false | |
matrix: | |
resource: ["coredns", "aws-node", "nvidia-device-plugin", "ec2-info"] | |
name: Update ${{ matrix.resource }} and open PR | |
runs-on: ubuntu-latest | |
env: | |
GOPRIVATE: "" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2 | |
with: | |
token: ${{ secrets.EKSCTLBOT_TOKEN }} | |
fetch-depth: 0 | |
- name: Configure AWS credentials for coredns update | |
if: ${{ matrix.resource == 'coredns' }} | |
uses: aws-actions/configure-aws-credentials@b47578312673ae6fa5b5096b330d9fbac3d116df # v4.2.1 | |
with: | |
aws-region: us-west-2 | |
role-duration-seconds: 900 | |
role-session-name: eksctl-update-coredns-assets | |
role-to-assume: ${{ secrets.UPDATE_COREDNS_ROLE_ARN }} | |
- name: Configure AWS credentials for ec2 info update | |
if: ${{ matrix.resource == 'ec2-info' }} | |
uses: aws-actions/configure-aws-credentials@b47578312673ae6fa5b5096b330d9fbac3d116df # v4.2.1 | |
with: | |
aws-region: us-west-2 | |
role-duration-seconds: 900 | |
role-session-name: eksctl-update-ec2-info-assets | |
role-to-assume: ${{ secrets.UPDATE_EC2_INFO_ROLE_ARN }} | |
- name: Setup identity as eksctl-bot | |
uses: ./.github/actions/setup-identity | |
with: | |
token: "${{ secrets.EKSCTLBOT_TOKEN }}" | |
- name: Setup build environment | |
uses: ./.github/actions/setup-build | |
- name: Update ${{ matrix.resource }} | |
run: make update-${{ matrix.resource }} | |
- name: Upsert pull request | |
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e #v7.0.8 | |
with: | |
token: ${{ secrets.EKSCTLBOT_TOKEN }} | |
commit-message: update ${{ matrix.resource }}${{ env.LATEST_RELEASE_TAG }} | |
committer: eksctl-bot <[email protected]> | |
title: 'Update ${{ matrix.resource }}${{ env.LATEST_RELEASE_TAG }}' | |
branch: update-${{ matrix.resource }} | |
labels: area/tech-debt | |
body: | | |
Auto-generated by [eksctl Update Generated Files GitHub workflow][1] | |
[1]: https://github.com/eksctl-io/eksctl/blob/main/.github/workflows/update-generated.yaml | |
Please manually test before approving and merging. |