|
1 | 1 | name: 'Generate Support Bundle'
|
2 | 2 | description: 'Composite action for generating a support bundle'
|
3 | 3 | inputs:
|
4 |
| - aws-access-key-id: |
5 |
| - description: 'AWS access key id for uploading support bundle' |
| 4 | + artifact-name: |
| 5 | + description: 'Name of the artifact to be uploaded' |
6 | 6 | required: true
|
7 |
| - aws-secret-access-key: |
8 |
| - description: 'AWS secret access key for uploading support bundle' |
9 |
| - required: true |
10 |
| - aws-region: |
11 |
| - description: 'AWS region for uploading support bundle' |
12 |
| - default: 'us-east-1' |
13 |
| - required: false |
14 | 7 | kots-namespace:
|
15 | 8 | description: 'KOTS namespace'
|
16 | 9 | required: true
|
17 | 10 | runs:
|
18 | 11 | using: "composite"
|
19 | 12 | steps:
|
20 |
| - - name: Generate support bundle on failure |
| 13 | + - id: generate-support-bundle |
21 | 14 | env:
|
22 |
| - AWS_ACCESS_KEY_ID: ${{ inputs.aws-access-key-id }} |
23 |
| - AWS_SECRET_ACCESS_KEY: ${{ inputs.aws-secret-access-key }} |
24 |
| - AWS_DEFAULT_REGION: ${{ inputs.aws-region }} |
25 | 15 | KOTS_NAMESPACE: ${{ inputs.kots-namespace }}
|
26 | 16 | run: |
|
27 | 17 | RELEASE="$(
|
|
33 | 23 | tar xzf support-bundle_linux_amd64.tar.gz
|
34 | 24 | ./support-bundle https://kots.io
|
35 | 25 | BUNDLE="$(ls -1 | grep 'support-bundle-.*.tar.gz')"
|
36 |
| - aws s3 cp "${BUNDLE}" "s3://kots-e2e-build-test-support-bundles/${BUNDLE}" |
37 |
| - echo "::notice ::support bundle uploaded to aws replicated-dev account s3://kots-e2e-build-test-support-bundles/${BUNDLE}" |
| 26 | + echo "bundle-name=$BUNDLE" >> "$GITHUB_OUTPUT" |
| 27 | + shell: bash |
| 28 | + |
| 29 | + - id: upload-support-bundle |
| 30 | + uses: actions/upload-artifact@v4 |
| 31 | + with: |
| 32 | + name: ${{ inputs.artifact-name }} |
| 33 | + path: ${{ steps.generate-support-bundle.outputs.bundle-name }} |
| 34 | + |
| 35 | + - name: Print support bundle URL |
38 | 36 | shell: bash
|
| 37 | + run: | |
| 38 | + echo "::notice ::support bundle can be downloaded from: ${{ steps.upload-support-bundle.outputs.artifact-url }}" |
0 commit comments