-
Notifications
You must be signed in to change notification settings - Fork 2
202 lines (188 loc) · 6.53 KB
/
main.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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
name: Publish Docker images
on:
push:
tags:
- "*"
env:
DOCKER_BUILDKIT: 1
COMPOSE_DOCKER_CLI_BUILD: 1
jobs:
shellcheck:
name: Shellcheck
if: github.event_name == 'push' && contains(github.ref, 'gh-shellcheck-v0.7.')
runs-on: ubuntu-22.04
env:
IMAGE_NAME: ghcr.io/supinf/shellcheck:0.7
steps:
- uses: actions/checkout@v3
- name: Build & Push
run: |
echo ${{ secrets.CR_PAT }} | docker login ghcr.io -u ${GITHUB_ACTOR} --password-stdin
docker build -t "${IMAGE_NAME}" haskell/shellcheck/versions/0.x/
docker push "${IMAGE_NAME}"
hadolint:
name: hadolint
if: github.event_name == 'push' && contains(github.ref, 'gh-hadolint-v1.19.')
runs-on: ubuntu-22.04
env:
IMAGE_NAME: ghcr.io/supinf/hadolint:1.19
steps:
- uses: actions/checkout@v3
- name: Build & Push
run: |
echo ${{ secrets.CR_PAT }} | docker login ghcr.io -u ${GITHUB_ACTOR} --password-stdin
docker build -t "${IMAGE_NAME}" haskell/hadolint/versions/1.19/
docker push "${IMAGE_NAME}"
awscli-1-18:
name: AWS CLI v1.18
if: github.event_name == 'push' && contains(github.ref, 'gh-awscli-v1.18.')
runs-on: ubuntu-22.04
env:
IMAGE_NAME: ghcr.io/supinf/awscli:1.18
steps:
- uses: actions/checkout@v3
- name: Build & Push
run: |
echo ${{ secrets.CR_PAT }} | docker login ghcr.io -u ${GITHUB_ACTOR} --password-stdin
docker build -t "${IMAGE_NAME}" python/awscli/versions/1.18/
docker push "${IMAGE_NAME}"
awscli-2-4:
name: AWS CLI v2.4
if: github.event_name == 'push' && contains(github.ref, 'gh-awscli-v2.4')
runs-on: ubuntu-22.04
env:
IMAGE_NAME: ghcr.io/supinf/awscli:2.4
steps:
- uses: actions/checkout@v3
- name: Build & Push
run: |
echo ${{ secrets.CR_PAT }} | docker login ghcr.io -u ${GITHUB_ACTOR} --password-stdin
docker build -t "${IMAGE_NAME}" python/awscli/versions/2.4/
docker push "${IMAGE_NAME}"
go-swagger:
name: go-swagger
if: github.event_name == 'push' && contains(github.ref, 'gh-go-swagger-v0.25.')
runs-on: ubuntu-22.04
env:
IMAGE_NAME: ghcr.io/supinf/go-swagger:0.25
steps:
- uses: actions/checkout@v3
- name: Build & Push
run: |
echo ${{ secrets.CR_PAT }} | docker login ghcr.io -u ${GITHUB_ACTOR} --password-stdin
docker build -t "${IMAGE_NAME}" golang/swagger/versions/0.x/
docker push "${IMAGE_NAME}"
hugo:
name: Hugo
if: github.event_name == 'push' && contains(github.ref, 'gh-hugo-v0.79.')
runs-on: ubuntu-22.04
env:
IMAGE_NAME: ghcr.io/supinf/hugo:0.79
steps:
- uses: actions/checkout@v3
- name: Build & Push
run: |
echo ${{ secrets.CR_PAT }} | docker login ghcr.io -u ${GITHUB_ACTOR} --password-stdin
docker build -t "${IMAGE_NAME}" golang/hugo/versions/0.x/
docker push "${IMAGE_NAME}"
cfn-lint:
name: CFn Lint
if: github.event_name == 'push' && contains(github.ref, 'gh-cfn-lint-v0.58')
runs-on: ubuntu-22.04
env:
IMAGE_NAME: ghcr.io/supinf/cfn-lint:0.58
steps:
- uses: actions/checkout@v3
- name: Build & Push
run: |
echo ${{ secrets.CR_PAT }} | docker login ghcr.io -u ${GITHUB_ACTOR} --password-stdin
docker build -t "${IMAGE_NAME}" python/cfn-lint/versions/0.58/
docker push "${IMAGE_NAME}"
test-http:
name: Test HTTP requests
if: github.event_name == 'push' && contains(github.ref, 'gh-test-http-v1.2')
runs-on: ubuntu-22.04
env:
IMAGE_NAME: ghcr.io/supinf/test-http:1.2
steps:
- uses: actions/checkout@v3
- name: Build & Push
run: |
echo ${{ secrets.CR_PAT }} | docker login ghcr.io -u ${GITHUB_ACTOR} --password-stdin
docker build -t "${IMAGE_NAME}" python/test-http/versions/1.2/
docker push "${IMAGE_NAME}"
aws-x-ray:
name: Test HTTP requests
if: github.event_name == 'push' && contains(github.ref, 'gh-x-ray-3.2')
runs-on: ubuntu-22.04
env:
IMAGE_NAME: ghcr.io/supinf/x-ray:3.2
steps:
- uses: actions/checkout@v3
- name: Build & Push
run: |
echo ${{ secrets.CR_PAT }} | docker login ghcr.io -u ${GITHUB_ACTOR} --password-stdin
docker build -t "${IMAGE_NAME}" golang/x-ray/versions/3.2/
docker push "${IMAGE_NAME}"
swagger-codegen:
name: swagger-codegen
if: github.event_name == 'push' && contains(github.ref, 'gh-swagger-codegen-v3.0')
runs-on: ubuntu-22.04
env:
IMAGE_NAME: ghcr.io/supinf/swagger-codegen:3.0
TARGET_DIR: java/swagger-codegen/versions/3.0
steps:
- uses: actions/checkout@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- name: Build & Push
working-directory: ${{ env.TARGET_DIR }}
run: |
echo ${{ secrets.CR_PAT }} | docker login ghcr.io -u ${GITHUB_ACTOR} --password-stdin
docker buildx build \
--platform=linux/amd64,linux/arm64 \
-f Dockerfile \
--push \
-t "${IMAGE_NAME}" \
.
swagger-codegen-2:
name: swagger-codegen
if: github.event_name == 'push' && contains(github.ref, 'gh-swagger-codegen-v2.4')
runs-on: ubuntu-22.04
env:
IMAGE_NAME: ghcr.io/supinf/swagger-codegen:2.4
TARGET_DIR: java/swagger-codegen/versions/2.4
steps:
- uses: actions/checkout@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- name: Build & Push
working-directory: ${{ env.TARGET_DIR }}
run: |
echo ${{ secrets.CR_PAT }} | docker login ghcr.io -u ${GITHUB_ACTOR} --password-stdin
docker buildx build \
--platform=linux/amd64,linux/arm64 \
-f Dockerfile \
--push \
-t "${IMAGE_NAME}" \
.
postgres-backup:
name: Postgres Backup
if: github.event_name == 'push' && contains(github.ref, 'gh-postgres-backup-v9.6-test')
runs-on: ubuntu-22.04
env:
IMAGE_NAME: ghcr.io/supinf/postgres-backup:9.6
steps:
- uses: actions/checkout@v3
- uses: actions/create-github-app-token@2986852ad836768dfea7781f31828eb3e17990fa #v1.6.2
id: app-token
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.PRIVATE_KEY }}
- name: Build & Push
run: |
echo ${{ steps.app-token.outputs.token }} | docker login ghcr.io -u ${GITHUB_ACTOR} --password-stdin
docker build -t "${IMAGE_NAME}" cli-tools/postgres-backup/versions/9.6/
docker push "${IMAGE_NAME}"