Skip to content

Commit

Permalink
feat: experiment with composite action
Browse files Browse the repository at this point in the history
  • Loading branch information
sbsrnt committed Mar 8, 2024
1 parent 071020d commit d0219cf
Showing 1 changed file with 41 additions and 37 deletions.
78 changes: 41 additions & 37 deletions .github/workflows/preview-publish-package.yml
Original file line number Diff line number Diff line change
@@ -1,41 +1,45 @@
---
name: Preview publish package
on:
pull_request_target:
types:
- labeled
jobs:
CI-00:
uses: ./.github/workflows/preview-publish-package-00-create-status-comment.yml
secrets: inherit
with:
prRef: ${{ github.event.pull_request.head.ref }}
name: Preview publish lerna package
description: Action designed to automate the process of building and publishing a preview version of a Lerna package to a github npm registry, enabling users to test and evaluate changes before the final release

CI-01:
needs: [CI-00]
uses: ./.github/workflows/preview-publish-package-01-publish-prerelease.yml
secrets: inherit
with:
prRef: ${{ github.event.pull_request.head.ref }}
inputs:
prRef:
description: Pull request reference, e.g. `main, ${{ github.event.pull_request.head.ref }}`
required: true

CI-02:
needs: [ CI-00, CI-01 ]
uses: ./.github/workflows/preview-publish-package-02-update-status-comment-on-success.yml
secrets: inherit
with:
prRef: ${{ github.event.pull_request.head.ref }}
runs:
using: composite
steps:
- id: CI-00
uses: ./.github/workflows/preview-publish-package-00-create-status-comment.yml
secrets: inherit
with:
prRef: ${{ inputs.prRef }}

CI-03:
needs: [ CI-00 ]
if: failure()
uses: ./.github/workflows/preview-publish-package-03-update-status-comment-on-failure.yml
secrets: inherit
with:
prRef: ${{ github.event.pull_request.head.ref }}
- id: CI-01
needs: [CI-00]
uses: ./.github/workflows/preview-publish-package-01-publish-prerelease.yml
secrets: inherit
with:
prRef: ${{ inputs.prRef }}

CI-04:
needs: [ CI-00 ]
uses: ./.github/workflows/preview-publish-package-04-remove-preview-publish-label.yml
secrets: inherit
with:
prRef: ${{ github.event.pull_request.head.ref }}
- id: CI-02
needs: [ CI-00, CI-01 ]
uses: ./.github/workflows/preview-publish-package-02-update-status-comment-on-success.yml
secrets: inherit
with:
prRef: ${{ inputs.prRef }}

- id: CI-03
needs: [ CI-00 ]
if: failure()
uses: ./.github/workflows/preview-publish-package-03-update-status-comment-on-failure.yml
secrets: inherit
with:
prRef: ${{ inputs.prRef }}

- id: CI-04
needs: [ CI-00 ]
uses: ./.github/workflows/preview-publish-package-04-remove-preview-publish-label.yml
secrets: inherit
with:
prRef: ${{ inputs.prRef }}

0 comments on commit d0219cf

Please sign in to comment.