-
Notifications
You must be signed in to change notification settings - Fork 1.5k
68 lines (63 loc) · 2.46 KB
/
update-generated.yaml
File metadata and controls
68 lines (63 loc) · 2.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
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@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
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@00943011d9042930efac3dcd3a170e4273319bc8 # v5.1.0
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@00943011d9042930efac3dcd3a170e4273319bc8 # v5.1.0
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 <eksctl-bot@users.noreply.github.com>
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.