Test #14
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: | |
workflow_dispatch: | |
inputs: | |
current-sha: | |
description: 'Current SHA to run Happo against' | |
required: true | |
pr-number: | |
description: 'Pull request number to send status check' | |
required: false | |
comment-id: | |
description: 'The comment-id of the slash command' | |
required: false | |
jobs: | |
snapshot: | |
name: Just a test | |
uses: ./.github/workflows/snapshot.yml | |
permissions: | |
contents: write | |
packages: write | |
with: | |
ref: ${{ inputs.current-sha }} | |
comment: | |
runs-on: ubuntu-latest | |
needs: [snapshot] | |
permissions: | |
pull-requests: write | |
steps: | |
- name: 'Format package list' | |
id: format | |
run: | | |
echo 'packagesList<<EOF' >> $GITHUB_OUTPUT | |
echo "$PUBLISHED_PACKAGES" | awk '{print "yarn add " $0}' >> $GITHUB_OUTPUT | |
echo 'EOF' >> $GITHUB_OUTPUT | |
env: | |
PUBLISHED_PACKAGES: ${{ needs.snapshot.outputs.publishedPackages }} | |
- uses: marocchino/sticky-pull-request-comment@v2 | |
if: needs.snapshot.outputs.numberOfPackages != '0' | |
with: | |
hide_and_recreate: true | |
hide_classify: "OUTDATED" | |
number: ${{ inputs.pr-number }} | |
message: | | |
Published packages | |
``` | |
${{ steps.format.outputs.packagesList }} | |
``` | |
- uses: marocchino/sticky-pull-request-comment@v2 | |
if: needs.snapshot.outputs.numberOfPackages == '0' | |
with: | |
hide_and_recreate: true | |
hide_classify: "OUTDATED" | |
number: ${{ inputs.pr-number }} | |
message: | | |
No packages have been published. Forgot to add a changeset? | |