Skip to content

Commit

Permalink
feat: updated docs release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
PabloCollazoCollarte committed Jan 17, 2025
1 parent 6bf78bf commit f704cdd
Showing 1 changed file with 35 additions and 2 deletions.
37 changes: 35 additions & 2 deletions .github/workflows/docs-release.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,51 @@
---
name: docs-release

concurrency: docs-release
concurrency: code-release-${{ github.ref }}

on:
pull_request:
types: [closed]
branches: ['main', 'main-*']
paths: ['docs/**', '.github/workflows/docs-**']
workflow_dispatch:
inputs:
BASELINE_BRANCH:
description: 'Baseline branch'
required: true
default: 'main'
RELEASE_LABELS:
description: 'Release labels (comma separated list)'
required: true
default: ''
CONCURRENCY_REF:
description: 'Concurrency reference'
required: false
default: ''

jobs:
dispatch:
name: Docs / Dispatch
if: ${{ github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'release-docs') }}
runs-on: ubuntu-24.04
steps:
- name: Trigger / Release Concurrently
if: contains(join(github.event.pull_request.labels.*.name, ', '), 'release-type')
uses: benc-uk/workflow-dispatch@v1
with:
workflow: ${{ github.workflow }}
inputs: '{ "BASELINE_BRANCH": "${{ github.ref }}", "CONCURRENCY_REF": "${{ github.ref }}", "RELEASE_LABELS": "${{ join(github.event.pull_request.labels.*.name, '', '') }}" }'

- name: Trigger / Release Job
if: !contains(join(github.event.pull_request.labels.*.name, ', '), 'release-type')
uses: benc-uk/workflow-dispatch@v1
with:
workflow: ${{ github.workflow }}
inputs: '{ "BASELINE_BRANCH": "${{ github.ref }}", "RELEASE_LABELS": "${{ join(github.event.pull_request.labels.*.name, '', '') }}" }'

release:
name: Release Docs Process
if: ${{ github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'release-docs') }}
if: ${{ github.event_name == 'workflow_dispatch' && contains(github.event.pull_request.labels.*.name, 'release-docs') }}
runs-on: ubuntu-24.04
steps:
- name: Checkout merge commit
Expand Down

0 comments on commit f704cdd

Please sign in to comment.