Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates GHAs to align closer to the most recent versions #477

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/create-github-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ jobs:
# Leaving this step here for when we want to publish API docs.
# docs:
# needs: release
# if: github.ref_name == 'main'
# uses: salesforcecli/github-workflows/.github/workflows/publishTypedoc.yml@main
# secrets: inherit
# if: ${{ github.ref_name == 'main' }}
# uses: salesforcecli/github-workflows/.github/workflows/publishTypedoc.yml@main
43 changes: 43 additions & 0 deletions .github/workflows/failureNotifications.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: failureNotifications
on:
workflow_run:
workflows:
- publish
- create-github-release
types:
- completed
jobs:
failure-notify:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
steps:
- name: Announce Failure
id: slack
uses: slackapi/[email protected]
env:
# for non-CLI-team-owned plugins, you can send this anywhere you like
SLACK_WEBHOOK_URL: ${{ secrets.IDEE_RELEASE_ALERT_SLACK_WEBHOOK }}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update if needed

SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
with:
# Payload can be visually tested here: https://app.slack.com/block-kit-builder/T01GST6QY0G#%7B%22blocks%22:%5B%5D%7D
# Only copy over the "blocks" array to the Block Kit Builder
payload: |
{
"text": "Workflow \"${{ github.event.workflow_run.name }}\" failed in ${{ github.event.workflow_run.repository.name }}",
"blocks": [
{
"type": "header",
"text": {
"type": "plain_text",
"text": ":bh-alert: Workflow \"${{ github.event.workflow_run.name }}\" failed in ${{ github.event.workflow_run.repository.name }} :bh-alert:"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Repo:* ${{ github.event.workflow_run.repository.html_url }}\n*Workflow name:* `${{ github.event.workflow_run.name }}`\n*Job url:* ${{ github.event.workflow_run.html_url }}"
}
}
]
}
5 changes: 2 additions & 3 deletions .github/workflows/onRelease.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
name: publish

on:
release:
# both release and prereleases
types: [published]
# support manual release in case something goes wrong and needs to be repeated or tested
workflow_dispatch:
inputs:
tag:
description: tag that needs to publish
description: github tag that needs to publish
type: string
required: true
jobs:
# parses the package.json version and detects prerelease tag (ex: beta from 4.4.4-beta.0)
getDistTag:
outputs:
tag: ${{ steps.distTag.outputs.tag }}
Expand Down
15 changes: 11 additions & 4 deletions .github/workflows/testCommitExceptMain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,22 @@ on:
branches-ignore: [main]

jobs:
unit-tests:
uses: salesforcecli/github-workflows/.github/workflows/unitTest.yml@main
yarn-lockfile-check:
uses: salesforcecli/github-workflows/.github/workflows/lockFileCheck.yml@main
# Since the Windows unit tests take much longer, we run the linux unit tests first and then run the windows unit tests in parallel with NUTs
linux-unit-tests:
needs: yarn-lockfile-check
uses: salesforcecli/github-workflows/.github/workflows/unitTestsLinux.yml@main
windows-unit-tests:
needs: linux-unit-tests
uses: salesforcecli/github-workflows/.github/workflows/unitTestsWindows.yml@main
test-bundle:
runs-on: ubuntu-latest
name: test bundling
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
with:
node-version: lts/*
cache: yarn
- uses: salesforcecli/github-workflows/.github/actions/yarnInstallWithRetries@main
Expand All @@ -21,7 +28,7 @@ jobs:
- name: check if bundling runs into failures
run: node scripts/testEsbuild.js
xNuts:
needs: unit-tests
needs: linux-unit-tests
name: external NUTs
uses: salesforcecli/github-workflows/.github/workflows/externalNut.yml@main
strategy:
Expand Down
Loading