Check for new release on Marketplace #190584
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: Check for new release on Marketplace | |
on: | |
schedule: | |
- cron: '*/10 * * * *' | |
jobs: | |
check-version: | |
name: Check for new version | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.PRISMA_BOT_TOKEN }} | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '18' | |
cache: 'npm' | |
- name: Install Dependencies | |
run: npm install | |
- name: Get version of published extensions on the VS Code marketplace | |
id: versions | |
run: | | |
node scripts/e2eTestsOnVsix/check_marketplace_version.js | |
- name: Check new release of stable and Insider | |
id: check_published_version | |
run: | | |
node scripts/e2eTestsOnVsix/check_for_new_release.js ${{ steps.versions.outputs.insider_version }} ${{ steps.versions.outputs.stable_version }} | |
- name: Trigger e2e tests for Insider | |
if: ${{ steps.check_published_version.outputs.new_insider_version }} | |
uses: benc-uk/workflow-dispatch@v1 | |
with: | |
workflow: E2E tests after release on VSIX | |
token: ${{ secrets.PRISMA_BOT_TOKEN }} | |
inputs: '{ "extension_type": "insider", "extension_version": "${{ steps.check_published_version.outputs.new_insider_version }}" }' | |
- name: Trigger e2e tests for stable | |
if: ${{ steps.check_published_version.outputs.new_stable_version }} | |
uses: benc-uk/workflow-dispatch@v1 | |
with: | |
workflow: E2E tests after release on VSIX | |
token: ${{ secrets.PRISMA_BOT_TOKEN }} | |
inputs: '{ "extension_type": "stable", "extension_version": "${{ steps.check_published_version.outputs.new_stable_version }}" }' | |
- name: 'Set current job url in SLACK_FOOTER env var' | |
if: ${{ failure() }} | |
run: echo "SLACK_FOOTER=<$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID|Click here to go to the job logs>" >> $GITHUB_ENV | |
- name: Slack Notification on Failure | |
if: ${{ failure() }} | |
uses: rtCamp/action-slack-notify@v2.3.0 | |
env: | |
SLACK_TITLE: 'Check for new release on Marketplace failed :x:' | |
SLACK_COLOR: '#FF0000' | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_FAILURES }} | |
SLACK_CHANNEL: feed-language-tools-failures | |
SLACK_USERNAME: Prismo | |
SLACK_ICON_EMOJI: ':boom:' | |
SLACK_MSG_AUTHOR: prisma-bot |