Skip to content

Remote Trigger Workflow #32

Remote Trigger Workflow

Remote Trigger Workflow #32

name: Remote Trigger Workflow
on:
workflow_dispatch:
inputs:
message:
description: 'Message from the remote repo'
required: true
default: 'Hello from remote'
data:
description: 'Additional data'
required: false
jobs:
prepare:
runs-on: ubuntu-latest
outputs:
timestamp: ${{ steps.set-timestamp.outputs.timestamp }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set timestamp
id: set-timestamp
run: |
TIMESTAMP=$(date +%Y%m%d%H%M%S)
echo "timestamp=$TIMESTAMP" >> $GITHUB_OUTPUT
- name: Create draft branch
run: |
git checkout -b build-draft-${{ steps.set-timestamp.outputs.timestamp }}
git push origin build-draft-${{ steps.set-timestamp.outputs.timestamp }}
test-all-packages:
needs: prepare
uses: ./.github/workflows/test-all-packages.yml
with:
ref: build-draft-${{ needs.prepare.outputs.timestamp }}
timestamp: ${{ needs.prepare.outputs.timestamp }}
integration:
needs: prepare
uses: ./.github/workflows/integration.yml
with:
ref: build-draft-${{ needs.prepare.outputs.timestamp }}
timestamp: ${{ needs.prepare.outputs.timestamp }}
create-release-branch:
needs: [prepare, test-all-packages, integration]
if: success()
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Create release branch
run: |
git checkout -b build-release-${{ needs.prepare.outputs.timestamp }}
git push origin build-release-${{ needs.prepare.outputs.timestamp }}
- name: Delete draft branch
run: |
git push origin --delete build-draft-${{ needs.prepare.outputs.timestamp }}