diff --git a/.github/actions/slack/action.yml b/.github/actions/slack/action.yml index a4ed1b4..e9b64ce 100644 --- a/.github/actions/slack/action.yml +++ b/.github/actions/slack/action.yml @@ -16,9 +16,17 @@ inputs: runs: using: "composite" steps: + - id: prepare_payload + run: | + PAYLOAD=$(jq -n -c \ + --arg msg "${{ inputs.message }}" \ + '{blocks: [{type: "section", text: {type: "mrkdwn", text: $msg|@json}}]}') + echo "PAYLOAD=$PAYLOAD" >> $GITHUB_ENV + shell: bash - uses: slackapi/slack-github-action@v1.26.0 env: SLACK_BOT_TOKEN: ${{ inputs.token }} with: channel-id: ${{ inputs.channel }} - slack-message: ${{ inputs.message }} + # slack-message: ${{ inputs.message }} + payload: ${{ env.PAYLOAD }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ce12e7d..ba66780 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,10 +19,10 @@ jobs: matrix: ruby_version: - '3.3' - - '3.2' - - '3.1' - - '3.0' - - '2.7' + # - '3.2' + # - '3.1' + # - '3.0' + # - '2.7' steps: - uses: actions/checkout@v4 - name: Ruby version @@ -31,17 +31,17 @@ jobs: run: gem -v - name: Bundler version run: bundle -v - - name: Install dependencies - run: bundle install - - name: Run tests - run: bundle exec rake spec - - name: Run tests with ITR - env: - DD_CIVISIBILITY_AGENTLESS_ENABLED: true - DD_CIVISIBILITY_ITR_ENABLED: true - DD_API_KEY: ${{ secrets.DD_API_KEY }} - DD_ENV: ci - run: bundle exec rake spec + # - name: Install dependencies + # run: bundle install + # - name: Run tests + # run: bundle exec rake spec + # - name: Run tests with ITR + # env: + # DD_CIVISIBILITY_AGENTLESS_ENABLED: true + # DD_CIVISIBILITY_ITR_ENABLED: true + # DD_API_KEY: ${{ secrets.DD_API_KEY }} + # DD_ENV: ci + # run: bundle exec rake spec notify: needs: test @@ -52,7 +52,7 @@ jobs: name: Notify success uses: ./.github/actions/slack with: - message: | + message: |- :github-check: [Test passed](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})! ${{ github.ref_type }}: ${{ github.ref_name }} Commit SHA: ${{ github.sha }} @@ -63,7 +63,7 @@ jobs: uses: ./.github/actions/slack name: Notify failure with: - message: | + message: |- :red-light: [Test failed](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})! ${{ github.ref_type }}: ${{ github.ref_name }} Commit SHA: ${{ github.sha }}