Skip to content

Commit

Permalink
set Slack secret, send docs PR link to slack
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeSchwert committed Oct 6, 2023
1 parent 13f97ad commit 33fb0c4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
5 changes: 3 additions & 2 deletions .github/scripts/push-docs-pr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,10 @@ then
sleep 60

echo "Creating a pull request"
gh pr create --title "Release SDK reference docs v$VERSION" \
PR=$(gh pr create --title "Release SDK reference docs v$VERSION" \
--body "Released from ts-immutable-sdk" \
--reviewer "$GITHUB_ACTOR"
--reviewer "$GITHUB_ACTOR")
echo "PR=$PR" >> $GITHUB_ENV
else
echo "No changes detected"
fi
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/publish-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ secrets.PLATFORM_SA_GITHUB_TOKEN }}
SDK_PUBLISH_SLACK_WEBHOOK: ${{ secrets.SDK_PUBLISH_SLACK_WEBHOOK }}
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -73,10 +74,10 @@ jobs:
if: ${{ success() && steps.docs_pr.conclusion == 'success' }}
uses: ./.github/actions/notify-slack-publish-status
with:
message: "Docs PR published successfully - please review and merge [Release SDK reference docs v${{ env.VERSION }}](https://github.com/immutable/imx-docs/pulls)"
message: "SDK reference documents PR created successfully - please review and merge ${{ env.PR }} into main."

- name: Notify SDK Slack Docs PR Failure
if: ${{ failure() && steps.docs_pr.conclusion == 'failure' }}
if: ${{ failure() }}
uses: ./.github/actions/notify-slack-publish-status
with:
message: "Docs PR failed to publish. Please check the logs for more details."
message: "Failed to create SDK reference documents PR. Please check the logs for more details."
1 change: 1 addition & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
env:
GH_TOKEN: ${{ secrets.PLATFORM_SA_GITHUB_TOKEN }}
NODE_OPTIONS: --max-old-space-size=14366
SDK_PUBLISH_SLACK_WEBHOOK: ${{ secrets.SDK_PUBLISH_SLACK_WEBHOOK }}
steps:
- name: Check Public Release Branch
if: contains(github.event.inputs.release_type, 'release') && (github.ref != 'refs/heads/main')
Expand Down

0 comments on commit 33fb0c4

Please sign in to comment.