Skip to content

Commit d382e5a

Browse files
committed
Update GHA & multiple ids
1 parent 4c7f788 commit d382e5a

2 files changed

Lines changed: 27 additions & 23 deletions

File tree

.github/workflows/build-and-test.yml

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ on:
1212
# branches:
1313
# - dev
1414
# - feature/*
15-
branches: ["dev", "master", "feature/*"]
15+
branches: [dev, master, feature/*, release/*]
1616
pull_request:
17-
branches: ["dev", "master", "feature/*"]
17+
branches: [dev, master, feature/*, release/*]
1818

1919
jobs:
2020

@@ -25,6 +25,7 @@ jobs:
2525
- uses: actions/checkout@v3
2626

2727
- name: Install poetry
28+
id: Build-Poetry
2829
run: pipx install poetry
2930

3031
- uses: actions/setup-python@v4
@@ -44,6 +45,7 @@ jobs:
4445
- uses: actions/checkout@v3
4546

4647
- name: Install poetry
48+
id: Build-Poetry-for-tests
4749
run: pipx install poetry
4850

4951
- uses: actions/setup-python@v4
@@ -55,6 +57,7 @@ jobs:
5557
run: poetry install
5658

5759
- name: Build Image for ES7
60+
id: Build-elasticsearch
5861
uses: docker/build-push-action@v4
5962
with:
6063
target: omni_es
@@ -71,6 +74,7 @@ jobs:
7174
7275
7376
- name: Run tests
77+
id: Build-tests
7478
run: poetry run pytest -sv ./tests
7579

7680
- name: Archive code coverage results
@@ -87,7 +91,7 @@ jobs:
8791
- uses: actions/checkout@v3
8892

8993
- name: Docker meta
90-
id: meta
94+
id: docker-build
9195
uses: docker/metadata-action@v4
9296
with:
9397
# images: euiyoung/fastapi-docker-github-actions:es
@@ -125,16 +129,6 @@ jobs:
125129
env:
126130
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
127131
if: always()
128-
# uses: 8398a7/action-slack@v3
129-
# with:
130-
# status: ${{ job.status }}
131-
# author_name: Montoring-Slack from GitHub Actions
132-
# fields: repo,message,commit,author,action,eventName,ref,workflow,took # selectable (default: repo,commit,message,author)\
133-
# mention: here
134-
# if_mention: failure,cancelled
135-
# env:
136-
# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
137-
# if: always() # Pick up events even if the job fails or is canceled.
138132

139133

140134

.github/workflows/slack-alert-backup.yml_

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,26 @@ jobs:
1515
steps:
1616
- uses: actions/checkout@v3
1717
- name: Post to a Slack channel
18-
uses: 8398a7/action-slack@v3
19-
with:
20-
status: ${{ job.status }}
21-
author_name: Montoring-Slack from GitHub Actions
22-
fields: repo,message,commit,author,action,eventName,ref,workflow,took # selectable (default: repo,commit,message,author)\
23-
mention: here
24-
if_mention: failure,cancelled
25-
env:
26-
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
27-
if: always() # Pick up events even if the job fails or is canceled.
18+
uses: act10ns/slack@v1
19+
with:
20+
status: ${{ job.status }}
21+
steps: ${{ toJson(steps) }}
22+
channel: '#alert'
23+
env:
24+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
25+
if: always()
26+
27+
# - name: Post to a Slack channel
28+
# uses: 8398a7/action-slack@v3
29+
# with:
30+
# status: ${{ job.status }}
31+
# author_name: Montoring-Slack from GitHub Actions
32+
# fields: repo,message,commit,author,action,eventName,ref,workflow,took # selectable (default: repo,commit,message,author)\
33+
# mention: here
34+
# if_mention: failure,cancelled
35+
# env:
36+
# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
37+
# if: always() # Pick up events even if the job fails or is canceled.
2838

2939

3040
# - name: Slack Notification

0 commit comments

Comments
 (0)