Skip to content

Merge pull request #188 from Checkmarx/dependabot/docker/checkmarx/as… #46

Merge pull request #188 from Checkmarx/dependabot/docker/checkmarx/as…

Merge pull request #188 from Checkmarx/dependabot/docker/checkmarx/as… #46

Workflow file for this run

name: Publish Checkmarx One CLI GitHub Action
on:
push:
tags:
- '*'
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.0
- name: Create Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.ref_name }}
generate_release_notes: true
notify:
runs-on: ubuntu-latest
needs: release
steps:
- name: Get latest relase notes
id: release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
body_release="$(gh api -H "Accept: application/vnd.github.v3+json" /repos/Checkmarx/ast-github-action/releases/latest | jq -r '.body' )"
body_release="${body_release//$'\n'/'%0A'}"
echo "::set-output name=body_release::$body_release"
- name: Converts Markdown to HTML
id: convert
uses: lifepal/markdown-to-html@v1.2
with:
text: "${{ steps.release.outputs.body_release }}"
- name: Clean html
id: clean
run: |
clean="$(echo "${{ steps.convert.outputs.html }}" | awk '{gsub(/id=.[a-z]+/,"");print}' | tr -d '\n')"
echo "$clean"
echo "::set-output name=clean::$clean"
- name: Send a Notification
id: notify
uses: thechetantalwar/teams-notify@v2
with:
teams_webhook_url: ${{ secrets.TEAMS_WEBHOOK_URI }}
message: "<h1>Checkmarx One Github Action ${{ github.ref_name }}</h1>${{ steps.clean.outputs.clean }}"