-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (65 loc) · 2.38 KB
/
local-release.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: Local release
on:
workflow_dispatch:
inputs:
service_image_name:
description: the service image to be updated
required: true
registry_url:
description: the name of registry server
required: true
tag:
description: version tag of the image
required: true
jobs:
Update:
name: Bump image tag
runs-on: ubuntu-20.04
continue-on-error: true
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: main
- name: Bump image tag
uses: ./.github/actions/release-action
with:
release: local
service_image_name: ${{ github.event.inputs.service_image_name }}
registry_url: ${{ github.event.inputs.registry_url }}
tag: ${{ github.event.inputs.tag }}
- name: Push to repo
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git commit -m "Releasing ${{ github.event.inputs.service_image_name }}:${{ github.event.inputs.tag }}" -a
git push
slackNotification:
needs: Update
name: Slack Notification
runs-on: ubuntu-20.04
steps:
- name: Slack Notification success
if: ${{ success() }}
uses: rtCamp/action-slack-notify@v2
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_CHANNEL: hydrosphere
SLACK_USERNAME: HydroRobot
SLACK_ICON: https://avatars.githubusercontent.com/u/17550625?s=200&v=4
SLACK_COLOR: ${{ job.status }}
SLACK_TITLE: Build status - success
SLACK_MESSAGE: "Releasing ${{ github.event.inputs.service_image_name }}:${{ github.event.inputs.tag }} :rocket:"
MSG_MINIMAL: true
- name: Slack Notification failure
if: ${{ failure() }}
uses: rtCamp/action-slack-notify@v2
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_CHANNEL: hydrosphere
SLACK_USERNAME: HydroRobot
SLACK_ICON: https://avatars.githubusercontent.com/u/17550625?s=200&v=4
SLACK_COLOR: ${{ job.status }}
SLACK_TITLE: Build status - failure
SLACK_MESSAGE: "Check build ${{ github.event.inputs.service_image_name }} status"
MSG_MINIMAL: true