Skip to content

Commit 5f9c562

Browse files
Alpha builds workflow: pass on more input parameters
1 parent 018831a commit 5f9c562

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

.github/workflows/alpha-build.yaml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,34 @@ on:
77
paths:
88
- "deps/**"
99
- ".github/workflows/**"
10+
env:
11+
DEV_WORKFLOW_REPOSITORY: "rabbitmq/server-packages"
1012
jobs:
1113
trigger_alpha_build:
1214
runs-on: ubuntu-latest
1315
steps:
1416
- name: Compute prerelease identifier from commit SHA
1517
run: echo "PRERELEASE_IDENTIFIER=`echo ${{ github.sha }} | cut -c1-8`" >> $GITHUB_ENV
16-
- name: Trigger an alpha build in rabbitmq/server-packages
18+
- name: Compute event date and time
19+
run: echo "PRERELEASE_TIMESTAMP=`date --rfc-3339=seconds`" >> $GITHUB_ENV
20+
- name: Compute event UNIX timestamp
21+
run: echo "PRERELEASE_TIMESTAMP=`date +%s`" >> $GITHUB_ENV
22+
- name: Trigger an alpha build in ${{ env.DEV_WORKFLOW_REPOSITORY }}
1723
run: |
1824
curl -L \
1925
-X POST \
2026
-H "Accept: application/vnd.github+json" \
2127
-H "Authorization: Bearer ${{ secrets.RABBITMQCI_BOT_TOKEN }}" \
2228
-H "X-GitHub-Api-Version: 2022-11-28" \
23-
https://api.github.com/repos/rabbitmq/server-packages/dispatches \
24-
-d '{"event_type": "new_4.1.x_alpha", "client_payload": {"prerelease": true, "prerelease_kind": "alpha", "prerelease_identifier": "${{ env.PRERELEASE_IDENTIFIER }}", "base_version": "4.1.0"}}'
29+
https://api.github.com/repos/rabbitmq/${{ env.DEV_WORKFLOW_REPOSITORY }}/dispatches \
30+
-d '{ \
31+
"event_type": "new_4.1.x_alpha", \
32+
"client_payload": { \
33+
"release_repository": "rabbitmq/${{ env.DEV_WORKFLOW_REPOSITORY }}", \
34+
"release_description": "Built from https://github.com/rabbitmq/rabbitmq-server/commit/${{ github.sha }} at ${{ env.PRERELEASE_TIMESTAMP }}", \
35+
"prerelease": true, \
36+
"prerelease_kind": "alpha",\
37+
"prerelease_identifier": "${{ env.PRERELEASE_IDENTIFIER }}",\
38+
"prerelease_title": "RabbitMQ alpha build, timestamp: ${{ env.PRERELEASE_TIMESTAMP }}, version: 4.1.0-alpha.${{ env.PRERELEASE_IDENTIFIER }}",\
39+
"base_version": "4.1.0"
40+
}}'

0 commit comments

Comments
 (0)