|
1 | 1 | --- |
2 | | - name: Fetch and Save Kubernetes Acceptance Tests |
3 | | - on: |
4 | | - workflow_dispatch: # Allows manual trigger of the workflow |
5 | | - repository_dispatch: # Allows other repositories to trigger this workflow |
6 | | - types: [trigger-acceptance-test-pull] |
7 | | - jobs: |
8 | | - fetch-and-save: |
9 | | - runs-on: ubuntu-latest |
10 | | - permissions: |
11 | | - id-token: write |
12 | | - contents: read |
13 | | - steps: |
14 | | - - name: configure aws credentials |
15 | | - uses: aws-actions/configure-aws-credentials@v4 |
16 | | - with: |
17 | | - aws-access-key-id: ${{ secrets.AWS_SM_READONLY_ACCESS_KEY_ID }} |
18 | | - aws-secret-access-key: ${{ secrets.AWS_SM_READONLY_SECRET_ACCESS_KEY }} |
19 | | - aws-region: us-west-2 |
20 | | - - name: get secrets from aws sm |
21 | | - uses: aws-actions/aws-secretsmanager-get-secrets@v2 |
22 | | - with: |
23 | | - secret-ids: | |
24 | | - ,sdlc/prod/github/actions_bot_token |
25 | | - parse-json-secrets: true |
26 | | - |
27 | | - - name: Checkout the repository |
28 | | - uses: actions/checkout@v4 |
29 | | - with: |
30 | | - ref: main |
31 | | - token: ${{ env.ACTIONS_BOT_TOKEN }} |
32 | | - path: redpanda-docs |
33 | | - |
34 | | - - name: Set up Node.js |
35 | | - uses: actions/setup-node@v4 |
36 | | - with: |
37 | | - node-version: '18' |
38 | | - |
39 | | - - name: Install dependencies |
40 | | - run: | |
41 | | - cd ./redpanda-docs/scripts/fetch-from-github |
42 | | - npm install |
43 | | -
|
44 | | - - name: Run the script and save the output |
45 | | - run: node ./redpanda-docs/scripts/fetch-from-github/fetch.js redpanda-data redpanda-operator acceptance/features ../../modules/manage/examples/kubernetes |
46 | | - env: |
47 | | - VBOT_GITHUB_API_TOKEN: ${{ env.ACTIONS_BOT_TOKEN }} |
48 | | - |
49 | | - - name: Create pull request |
50 | | - uses: peter-evans/create-pull-request@v6 |
51 | | - with: |
52 | | - commit-message: "auto-docs: Update K8s acceptance tests" |
53 | | - token: ${{ env.ACTIONS_BOT_TOKEN }} |
54 | | - branch: update-acceptance-tests |
55 | | - title: "auto-docs: Update K8s acceptance tests" |
56 | | - body: "This PR auto-updates the acceptance tests we use as examples in our Kubernetes docs." |
57 | | - labels: auto-docs |
| 2 | +name: Fetch and Save Kubernetes Acceptance Tests |
| 3 | +on: |
| 4 | + workflow_dispatch: # Allows manual trigger of the workflow |
| 5 | + repository_dispatch: # Allows other repositories to trigger this workflow |
| 6 | + types: [trigger-acceptance-test-pull] |
| 7 | +jobs: |
| 8 | + fetch-and-save: |
| 9 | + runs-on: ubuntu-24.04 |
| 10 | + permissions: |
| 11 | + id-token: write |
| 12 | + contents: read |
| 13 | + steps: |
| 14 | + - name: configure aws credentials |
| 15 | + uses: aws-actions/configure-aws-credentials@v4 |
| 16 | + with: |
| 17 | + aws-region: ${{ vars.RP_AWS_CRED_REGION }} |
| 18 | + role-to-assume: arn:aws:iam::${{ secrets.RP_AWS_CRED_ACCOUNT_ID }}:role/${{ vars.RP_AWS_CRED_BASE_ROLE_NAME }}${{ github.event.repository.name }} |
| 19 | + - name: get secrets from aws sm |
| 20 | + uses: aws-actions/aws-secretsmanager-get-secrets@v2 |
| 21 | + with: |
| 22 | + secret-ids: | |
| 23 | + ,sdlc/prod/github/actions_bot_token |
| 24 | + parse-json-secrets: true |
| 25 | + - name: Checkout the repository |
| 26 | + uses: actions/checkout@v4 |
| 27 | + with: |
| 28 | + ref: main |
| 29 | + token: ${{ env.ACTIONS_BOT_TOKEN }} |
| 30 | + path: redpanda-docs |
| 31 | + - name: Set up Node.js |
| 32 | + uses: actions/setup-node@v4 |
| 33 | + with: |
| 34 | + node-version: '18' |
| 35 | + - name: Install dependencies |
| 36 | + run: | |
| 37 | + cd ./redpanda-docs/scripts/fetch-from-github |
| 38 | + npm install |
| 39 | + - name: Run the script and save the output |
| 40 | + run: node ./redpanda-docs/scripts/fetch-from-github/fetch.js redpanda-data redpanda-operator acceptance/features ../../modules/manage/examples/kubernetes |
| 41 | + env: |
| 42 | + VBOT_GITHUB_API_TOKEN: ${{ env.ACTIONS_BOT_TOKEN }} |
| 43 | + - name: Create pull request |
| 44 | + uses: peter-evans/create-pull-request@v6 |
| 45 | + with: |
| 46 | + commit-message: "auto-docs: Update K8s acceptance tests" |
| 47 | + token: ${{ env.ACTIONS_BOT_TOKEN }} |
| 48 | + branch: update-acceptance-tests |
| 49 | + title: "auto-docs: Update K8s acceptance tests" |
| 50 | + body: "This PR auto-updates the acceptance tests we use as examples in our Kubernetes docs." |
| 51 | + labels: auto-docs |
0 commit comments