Skip to content

Alpha builds workflow: pass on more input parameters #19

Alpha builds workflow: pass on more input parameters

Alpha builds workflow: pass on more input parameters #19

Workflow file for this run

name: Trigger an alpha release build
on:
workflow_dispatch:
push:
branches:
- "main"
paths:
- "deps/**"
- ".github/workflows/**"
env:
DEV_WORKFLOW_REPOSITORY: "rabbitmq/server-packages"
jobs:
trigger_alpha_build:
runs-on: ubuntu-latest
steps:
- name: Compute prerelease identifier from commit SHA
run: echo "PRERELEASE_IDENTIFIER=`echo ${{ github.sha }} | cut -c1-8`" >> $GITHUB_ENV
- name: Compute event date and time
run: echo "PRERELEASE_TIMESTAMP=`date --rfc-3339=seconds`" >> $GITHUB_ENV
- name: Compute event UNIX timestamp
run: echo "PRERELEASE_TIMESTAMP=`date +%s`" >> $GITHUB_ENV
- name: Trigger an alpha build in ${{ env.DEV_WORKFLOW_REPOSITORY }}
run: |
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.RABBITMQCI_BOT_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/rabbitmq/${{ env.DEV_WORKFLOW_REPOSITORY }}/dispatches \
-d '{ \
"event_type": "new_4.1.x_alpha", \
"client_payload": { \
"release_repository": "rabbitmq/${{ env.DEV_WORKFLOW_REPOSITORY }}", \
"release_description": "Built from https://github.com/rabbitmq/rabbitmq-server/commit/${{ github.sha }} at ${{ env.PRERELEASE_TIMESTAMP }}", \
"prerelease": true, \
"prerelease_kind": "alpha",\
"prerelease_identifier": "${{ env.PRERELEASE_IDENTIFIER }}",\
"prerelease_title": "RabbitMQ alpha build, timestamp: ${{ env.PRERELEASE_TIMESTAMP }}, version: 4.1.0-alpha.${{ env.PRERELEASE_IDENTIFIER }}",\
"base_version": "4.1.0"
}}'