-
Notifications
You must be signed in to change notification settings - Fork 4
71 lines (63 loc) · 2.01 KB
/
build.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
name: Docker Build Images
on:
workflow_dispatch:
push:
branches:
- master
paths-ignore:
- README.md
env:
PLATFORMS: 'linux/amd64,linux/arm64'
IMAGE_NAME: 'easypi/urlwatch'
URLWATCH_VERSION: '2.28'
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: docker/setup-qemu-action@v1
- uses: docker/setup-buildx-action@v1
- uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- uses: docker/build-push-action@v2
with:
platforms: ${{ env.PLATFORMS }}
build-args: |
URLWATCH_VERSION=${{ env.URLWATCH_VERSION }}
tags: |
${{ env.IMAGE_NAME }}:${{ env.URLWATCH_VERSION }}
${{ env.IMAGE_NAME }}:latest
push: true
- if: ${{ always() }}
uses: slackapi/[email protected]
with:
channel-id: github
payload: |
{
"attachments": [
{
"color": "${{ job.status == 'success' && 'good' || 'danger' }}",
"title": "${{ github.repository }}",
"title_link": "https://github.com/${{ github.repository }}",
"text": "docker build image result",
"fields": [
{
"title": "Image",
"value": "<https://hub.docker.com/r/${{ env.IMAGE_NAME }}|${{ env.IMAGE_NAME }}>",
"short": true
},
{
"title": "Status",
"value": "${{ job.status }}",
"short": true
}
],
"footer": "Github Actions",
"footer_icon": "https://github.githubassets.com/favicon.ico"
}
]
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}