forked from desyncr/zsh-docker
-
Notifications
You must be signed in to change notification settings - Fork 17
170 lines (154 loc) · 5.18 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
name: Images
on:
push:
pull_request:
schedule:
- cron: '0 0 * * 0'
jobs:
images:
strategy:
fail-fast: false
matrix:
include:
- docker-tags: 'master'
zsh-ref: 'master'
- docker-tags: |
5.9
latest
zsh-ref: 'zsh-5.9'
- docker-tags: '5.8.1'
zsh-ref: 'zsh-5.8.1'
- docker-tags: '5.8'
zsh-ref: 'zsh-5.8'
- docker-tags: '5.7.1'
zsh-ref: 'zsh-5.7.1'
- docker-tags: '5.7'
zsh-ref: 'zsh-5.7'
- docker-tags: '5.6.2'
zsh-ref: 'zsh-5.6.2'
- docker-tags: '5.6.1'
zsh-ref: 'zsh-5.6.1'
- docker-tags: '5.6'
zsh-ref: 'zsh-5.6'
- docker-tags: '5.5.1'
zsh-ref: 'zsh-5.5.1'
- docker-tags: '5.5'
zsh-ref: 'zsh-5.5'
- docker-tags: '5.4.2'
zsh-ref: 'zsh-5.4.2'
- docker-tags: '5.4.1'
zsh-ref: '5.4.1'
- docker-tags: '5.4'
zsh-ref: '5.4'
- docker-tags: '5.3.1'
zsh-ref: 'zsh-5.3.1'
- docker-tags: '5.3'
zsh-ref: 'zsh-5.3'
- docker-tags: '5.2'
zsh-ref: 'zsh-5.2'
- docker-tags: '5.1.1'
zsh-ref: 'zsh-5.1.1'
- docker-tags: '5.1'
zsh-ref: 'zsh-5.1'
- docker-tags: '5.0.8'
zsh-ref: 'zsh-5.0.8'
- docker-tags: '5.0.7'
zsh-ref: 'zsh-5.0.7'
- docker-tags: '5.0.6'
zsh-ref: 'zsh-5.0.6'
- docker-tags: '5.0.5'
zsh-ref: 'zsh-5.0.5'
- docker-tags: '5.0.4'
zsh-ref: 'zsh-5.0.4'
- docker-tags: '5.0.3'
zsh-ref: 'zsh-5.0.3'
- docker-tags: '5.0.2'
zsh-ref: 'zsh-5.0.2'
- docker-tags: '5.0.1'
zsh-ref: 'zsh-5.0.1'
- docker-tags: '5.0.0'
zsh-ref: 'zsh-5.0.0'
- docker-tags: '4.3.17'
zsh-ref: 'zsh-4.3.17'
- docker-tags: '4.3.16'
zsh-ref: 'zsh-4.3.16'
- docker-tags: '4.3.15'
zsh-ref: 'zsh-4.3.15'
- docker-tags: '4.3.14'
zsh-ref: 'zsh-4.3.14'
- docker-tags: '4.3.13'
zsh-ref: 'zsh-4.3.13'
- docker-tags: '4.3.12'
zsh-ref: 'zsh-4.3.12'
- docker-tags: '4.3.11'
zsh-ref: 'zsh-4.3.11'
name: ${{ matrix.docker-tags }}
runs-on: 'ubuntu-latest'
permissions:
packages: write
contents: read
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
version: v0.6.0
install: true
use: true
- name: Log in to Docker Hub
uses: docker/login-action@v2
if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request'
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Log in to Github registry
uses: docker/login-action@v2
if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request'
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Generate image metadata
id: meta
uses: docker/metadata-action@v4
with:
images: |
zshusers/zsh
ghcr.io/zsh-users/zsh
tags: ${{ matrix.docker-tags }}
labels: |
maintainer=https://github.com/zsh-users
org.opencontainers.image.title=zsh
org.opencontainers.image.description=Zsh is a shell designed for interactive use, although it is also a powerful scripting language.
org.opencontainers.image.url=https://www.zsh.org
org.opencontainers.image.source=https://github.com/zsh-users/zsh-docker
org.opencontainers.image.licenses=https://raw.githubusercontent.com/zsh-users/zsh/master/LICENCE
- name: Build and push image
uses: docker/build-push-action@v3
timeout-minutes: 60
with:
context: .
platforms: linux/amd64,linux/arm64
push: ${{ github.ref == 'refs/heads/master' && github.event_name != 'pull_request' }}
build-args: ref=${{ matrix.zsh-ref }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha
notify:
runs-on: ubuntu-latest
needs: images
if: failure() && github.event_name != 'pull_request' && github.repository_owner == 'zsh-users'
steps:
- name: Send notification to Matrix channel
id: matrix-chat-message
uses: fadenb/[email protected]
with:
homeserver: 'matrix.org'
token: ${{ secrets.MATRIX_TOKEN }}
channel: '!gWTEWHvypdUdiLeXET:matrix.org'
message: |
[Build ${{ github.run_id }} failed](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})