Skip to content

Commit

Permalink
Update action.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
venkatamutyala authored Oct 7, 2024
1 parent 7522db8 commit f02cb4d
Showing 1 changed file with 30 additions and 43 deletions.
73 changes: 30 additions & 43 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,22 +146,18 @@ runs:
uses: slackapi/slack-github-action@v1.27.0
with:
payload: |
{
"text": ":raising_hand: OpenTofu workflow needs approval :raising_hand:",
"attachments": [
{
"pretext": "View Job/Status: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}",
"color": "FFA500",
"fields": [
{
"attachments": [
{
"title": "${{ github.event.repository.name }} - https://github.com/${{ github.repository }}",
"short": true,
"value": ":raising_hand: Approval Required: https://github.com/${{ github.repository }}/issues"
"color": "#FFA500",
"author_name": ":link: OpenTofu - ${{ github.event.repository.name }} - Job Details",
"author_link": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}",
"title": "https://github.com/${{ github.repository }}",
"title_link": "https://github.com/${{ github.repository }}",
"text": ":raising_hand: Approval Required: https://github.com/${{ github.repository }}/issues"
}
]
}
]
}
]
}
env:
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK

Expand Down Expand Up @@ -201,23 +197,18 @@ runs:
uses: slackapi/slack-github-action@v1.27.0
with:
payload: |
{
"text": ":large_green_circle: OpenTofu workflow - SUCCESS :large_green_circle:",
"title_link": "https://www.example.com",
"title": "YOLO test",
"attachments": [
{
"pretext": ":large_green_circle: <Job Details|https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}> \n:<Repository ${{ github.event.repository.name }}|https://github.com/${{ github.repository }}>",
"color": "00FF00",
"fields": [
{
"attachments": [
{
"short": false,
"value": ":large_green_circle: SUCCESS :large_green_circle:"
"color": "#36a64f",
"author_name": ":link: OpenTofu - ${{ github.event.repository.name }} - Job Details",
"author_link": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}",
"title": "https://github.com/${{ github.repository }}",
"title_link": "https://github.com/${{ github.repository }}",
"text": ":large_green_circle: SUCCESS :large_green_circle:"
}
]
}
]
}
]
}
env:
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK

Expand All @@ -227,21 +218,17 @@ runs:
uses: slackapi/slack-github-action@v1.27.0
with:
payload: |
{
"text": ":rotating_light: OpenTofu workflow - FAILURE :rotating_light:",
"attachments": [
{
"pretext": ":rotating_light: Job Details: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} \n\n\n:link: https://github.com/${{ github.repository }}",
"color": "FF0000",
"fields": [
{
"attachments": [
{
"title": "${{ github.event.repository.name }} - https://github.com/${{ github.repository }}",
"short": true,
"value": ":rotating_light: FAILURE :rotating_light:"
"color": "#FF0000",
"author_name": ":link: OpenTofu - ${{ github.event.repository.name }} - Job Details",
"author_link": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}",
"title": "https://github.com/${{ github.repository }}",
"title_link": "https://github.com/${{ github.repository }}",
"text": ":rotating_light: FAILURE :rotating_light:"
}
]
}
]
}
]
}
env:
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK

0 comments on commit f02cb4d

Please sign in to comment.