Skip to content

Publish Release Drafts #57

Publish Release Drafts

Publish Release Drafts #57

Workflow file for this run

name: Publish Release Drafts
on:
workflow_dispatch:
inputs:
owner_repo_ids:
description: |
owner_repo_ids: JSON array of { owner: string, repo: string, release_id: number } objects.
All the listed release drafts will be published.
required: true
jobs:
publish:
name: Publish release drafts
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v3
with:
github-token: ${{ secrets.MOVE2KUBE_PATOKEN }}
script: |
const owner_repo_ids = JSON.parse('${{ github.event.inputs.owner_repo_ids }}');
const resp = await github.repos.getRelease(owner_repo_ids[0]);
const tag = resp.data.tag_name;
const promises = owner_repo_ids.map(owner_repo_id => github.repos.updateRelease({...owner_repo_id, draft: false}));
await Promise.all(promises);
await github.actions.createWorkflowDispatch({
owner: context.repo.owner,
repo: 'move2kube-website',
workflow_id: 'releaseinfo.yml',
ref: 'main',
inputs: {tag},
});
await github.actions.createWorkflowDispatch({
owner: context.repo.owner,
repo: 'move2kube-ui',
workflow_id: 'raise-operator-pr.yml',
ref: 'main',
inputs: {tag, 'commit_ref': 'main'},
});