-
Notifications
You must be signed in to change notification settings - Fork 1
71 lines (67 loc) · 2.13 KB
/
build.yml
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
name: Build ecom-http-utils library
on: push
jobs:
build:
runs-on: ubuntu-latest
container:
image: ext-registry.tilia-inc.com/ll-lang/gobuild:1.18.8
credentials:
username: github
password: ${{ secrets.EXT_REGISTRY_PASSWORD }}
steps:
-
name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
-
name: Ensure Version Bump
shell: bash
run: |
VERSIONS_EXIST=$(for i in $(cat Version); do git tag -l v$i; done)
echo "The following versions have been set - ${VERSIONS_EXIST[*]}"
if [[ ${GITHUB_REF_NAME} != master ]] && [[ -n "$VERSIONS_EXIST" ]];
then echo "Need to update Version file - exiting" && exit 1; fi
-
name: Go Cache
uses: actions/cache@v3
with:
path: /app/pkg/mod/cache/download
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
-
name: Build
shell: bash
run: |
set -x
git config --global url."https://${{ secrets.ECOM_LINDEN_PAT }}@github.com".insteadOf "https://github.com"
make cover
#Clear LINT_OPTS so it does apply fixes
export LINT_OPTS=
make lint
make build
-
name: Tag
run: |
/sbin/tag.sh Version
if [ $? != 0 ]; then exit 1; fi
-
name: Slack
id: drone
uses: slackapi/[email protected]
with:
channel-id: extraction-notify
payload: |
{
"text": "GitHub Action build result: ${{ job.status }}\n${{ github.event.pull_request.html_url || github.event.head_commit.url }}",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "GitHub Action build result: ${{ job.status }}\n${{ github.event.pull_request.html_url || github.event.head_commit.url }}"
}
}
]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.ECOM_SLACK_WEBHOOK_URL }}