Skip to content

Commit 934ce3f

Browse files
authored
print the download link for a PR's build (#488)
* print the download link for a PR's build * make license ID an env var * ? * f * fff * really? * ??? * rearrange * yaml is fun, really * escape? * add link
1 parent f3ffd15 commit 934ce3f

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

.github/workflows/pull-request.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ jobs:
4141
build:
4242
name: Build
4343
runs-on: ubuntu-latest
44+
permissions:
45+
pull-requests: write
4446
steps:
4547
- name: Checkout
4648
uses: actions/checkout@v4
@@ -118,6 +120,22 @@ jobs:
118120
rm e2e/kots-release-install/release.yaml
119121
replicated release create --yaml-dir e2e/kots-release-install --promote CI-airgap --version "appver-${SHORT_SHA}"
120122
123+
- name: Create download link message text
124+
run: |
125+
export SHORT_SHA=dev-$(git rev-parse --short=7 HEAD)
126+
127+
echo "This PR has been released (on staging) and is available for download with a embedded-cluster-smoke-test-staging-app [license ID](https://vendor.staging.replicated.com/apps/embedded-cluster-smoke-test-staging-app/customers?sort=name-asc)." > download-link.txt
128+
echo "\`\`\`" >> download-link.txt
129+
echo "curl https://staging.replicated.app/embedded/embedded-cluster-smoke-test-staging-app/ci/${SHORT_SHA} -H \"Authorization: \$EC_SMOKE_TEST_LICENSE_ID\" -o embedded-cluster-smoke-test-staging-app-ci.tgz" >> download-link.txt
130+
echo "\`\`\`" >> download-link.txt
131+
echo "Happy debugging!" >> download-link.txt
132+
cat download-link.txt
133+
134+
- name: comment download link
135+
uses: mshick/add-pr-comment@v2
136+
with:
137+
message-path: download-link.txt
138+
121139
- name: upload binary
122140
uses: actions/upload-artifact@v4
123141
with:

0 commit comments

Comments
 (0)