Skip to content
This repository was archived by the owner on Jan 11, 2025. It is now read-only.

Commit 1c2e31b

Browse files
fixes for autogenerate release
1 parent d716a3c commit 1c2e31b

File tree

6 files changed

+109
-180
lines changed

6 files changed

+109
-180
lines changed

.github/workflows/auto_update.yml .github/workflows/autoupdate.yml

+52-68
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,11 @@ on:
44
schedule:
55
- cron: '0 0 * * *'
66

7-
env:
8-
IMAGE_NAME: fabiocicerchia/nginx-lua
9-
107
jobs:
11-
artifacts:
12-
runs-on: ubuntu-latest
13-
steps:
14-
- uses: actions/checkout@v2
15-
16-
- name: Archive metadata artifacts
17-
uses: actions/upload-artifact@v2
18-
with:
19-
name: metadata
20-
path: docs/metadata
21-
retention-days: 1
22-
238
auto_update:
9+
name: Auto Update
2410
runs-on: ubuntu-latest
25-
needs: artifacts
26-
steps:
11+
steps:
2712
- uses: actions/checkout@v2
2813

2914
- name: Generate Supported Versions
@@ -33,18 +18,15 @@ jobs:
3318
uses: andymckay/[email protected]
3419
if: ${{ job.status != 'success' }}
3520

36-
3721
docker_alpine:
22+
name: Build Docker Alpine
3823
runs-on: ubuntu-latest
3924
needs: auto_update
4025
steps:
4126
- uses: actions/checkout@v2
4227

43-
- name: Restore metadata artifacts
44-
uses: actions/download-artifact@v2
45-
with:
46-
name: metadata-alpine
47-
path: docs/metadata/*alpine*
28+
- name: Cleanup metadata artifacts
29+
run: rm -rf docs/metadata/*
4830

4931
- name: Build images
5032
run: make build-alpine
@@ -64,20 +46,18 @@ jobs:
6446
uses: actions/upload-artifact@v2
6547
with:
6648
name: metadata-alpine
67-
path: docs/metadata/*alpine*
49+
path: docs/metadata
6850
retention-days: 1
6951

7052
docker_amazonlinux:
53+
name: Build Docker Amazon Linux
7154
runs-on: ubuntu-latest
7255
needs: auto_update
7356
steps:
7457
- uses: actions/checkout@v2
7558

76-
- name: Restore metadata artifacts
77-
uses: actions/download-artifact@v2
78-
with:
79-
name: metadata-amazonlinux
80-
path: docs/metadata/*amazonlinux*
59+
- name: Cleanup metadata artifacts
60+
run: rm -rf docs/metadata/*
8161

8262
- name: Build images
8363
run: make build-amazonlinux
@@ -97,20 +77,18 @@ jobs:
9777
uses: actions/upload-artifact@v2
9878
with:
9979
name: metadata-amazonlinux
100-
path: docs/metadata/*amazonlinux*
80+
path: docs/metadata
10181
retention-days: 1
10282

10383
docker_centos:
84+
name: Build Docker CentOS
10485
runs-on: ubuntu-latest
10586
needs: auto_update
10687
steps:
10788
- uses: actions/checkout@v2
10889

109-
- name: Restore metadata artifacts
110-
uses: actions/download-artifact@v2
111-
with:
112-
name: metadata-centos
113-
path: docs/metadata/*centos*
90+
- name: Cleanup metadata artifacts
91+
run: rm -rf docs/metadata/*
11492

11593
- name: Build images
11694
run: make build-centos
@@ -130,20 +108,18 @@ jobs:
130108
uses: actions/upload-artifact@v2
131109
with:
132110
name: metadata-centos
133-
path: docs/metadata/*centos*
111+
path: docs/metadata
134112
retention-days: 1
135113

136114
docker_debian:
115+
name: Build Docker Debian
137116
runs-on: ubuntu-latest
138117
needs: auto_update
139118
steps:
140119
- uses: actions/checkout@v2
141120

142-
- name: Restore metadata artifacts
143-
uses: actions/download-artifact@v2
144-
with:
145-
name: metadata-debian
146-
path: docs/metadata/*debian*
121+
- name: Cleanup metadata artifacts
122+
run: rm -rf docs/metadata/*
147123

148124
- name: Build images
149125
run: make build-debian
@@ -163,20 +139,18 @@ jobs:
163139
uses: actions/upload-artifact@v2
164140
with:
165141
name: metadata-debian
166-
path: docs/metadata/*debian*
142+
path: docs/metadata
167143
retention-days: 1
168144

169145
docker_fedora:
146+
name: Build Docker Fedora
170147
runs-on: ubuntu-latest
171148
needs: auto_update
172149
steps:
173150
- uses: actions/checkout@v2
174151

175-
- name: Restore metadata artifacts
176-
uses: actions/download-artifact@v2
177-
with:
178-
name: metadata-fedora
179-
path: docs/metadata/*fedora*
152+
- name: Cleanup metadata artifacts
153+
run: rm -rf docs/metadata/*
180154

181155
- name: Build images
182156
run: make build-fedora
@@ -196,20 +170,18 @@ jobs:
196170
uses: actions/upload-artifact@v2
197171
with:
198172
name: metadata-fedora
199-
path: docs/metadata/*fedora*
173+
path: docs/metadata
200174
retention-days: 1
201175

202176
docker_ubuntu:
177+
name: Build Docker Ubuntu
203178
runs-on: ubuntu-latest
204179
needs: auto_update
205180
steps:
206181
- uses: actions/checkout@v2
207182

208-
- name: Restore metadata artifacts
209-
uses: actions/download-artifact@v2
210-
with:
211-
name: metadata-ubuntu
212-
path: docs/metadata/*ubuntu*
183+
- name: Cleanup metadata artifacts
184+
run: rm -rf docs/metadata/*
213185

214186
- name: Build images
215187
run: make build-ubuntu
@@ -229,61 +201,73 @@ jobs:
229201
uses: actions/upload-artifact@v2
230202
with:
231203
name: metadata-ubuntu
232-
path: docs/metadata/*ubuntu*
204+
path: docs/metadata
233205
retention-days: 1
234206

235207
metadata:
208+
name: Generates Metadata
236209
runs-on: ubuntu-latest
237210
needs: [docker_alpine, docker_amazonlinux, docker_centos, docker_debian, docker_fedora, docker_ubuntu]
238211
steps:
239212
- uses: actions/checkout@v2
240213

241-
- name: Restore alpine metadata artifacts
242-
uses: actions/download-artifact@v2
243-
with:
244-
name: metadata-alpine
245-
path: docs/metadata/*alpine*
246-
247214
- name: Restore amazonlinux metadata artifacts
248215
uses: actions/download-artifact@v2
249216
with:
250217
name: metadata-amazonlinux
251-
path: docs/metadata/*amazonlinux*
218+
path: docs/metadata
252219

253220
- name: Restore centos metadata artifacts
254221
uses: actions/download-artifact@v2
255222
with:
256223
name: metadata-centos
257-
path: docs/metadata/*centos*
224+
path: docs/metadata
258225

259226
- name: Restore debian metadata artifacts
260227
uses: actions/download-artifact@v2
261228
with:
262229
name: metadata-debian
263-
path: docs/metadata/*debian*
230+
path: docs/metadata
264231

265232
- name: Restore fedora metadata artifacts
266233
uses: actions/download-artifact@v2
267234
with:
268235
name: metadata-fedora
269-
path: docs/metadata/*fedora*
236+
path: docs/metadata
270237

271238
- name: Restore ubuntu metadata artifacts
272239
uses: actions/download-artifact@v2
273240
with:
274241
name: metadata-ubuntu
275-
path: docs/metadata/*ubuntu*
242+
path: docs/metadata
276243

277244
- name: Push metadata
278245
run: make auto-commit-metadata
279246
if: github.ref == 'refs/heads/master'
280247

281248
auto_tag:
249+
name: Create Release
282250
runs-on: ubuntu-latest
283251
needs: metadata
284252
steps:
285253
- uses: actions/checkout@v2
286254

287-
- name: Create tag
288-
run: make auto-tag
289-
if: github.ref == 'refs/heads/master'
255+
- name: Get version
256+
id: version
257+
run: echo "::set-output name=version::$(date +'v1.%Y%m%d.%H%M%S')"
258+
259+
- name: Test with environment variables
260+
run: echo $TAG_NAME
261+
env:
262+
TAG_NAME: ${{ steps.version.outputs.version }}
263+
264+
- name: Create Release
265+
id: create_release
266+
uses: actions/create-release@v1
267+
env:
268+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
269+
with:
270+
tag_name: $TAG_NAME
271+
release_name: Release $TAG_NAME
272+
draft: false
273+
prerelease: false

.github/workflows/linter.yml

+6-30
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,23 @@
1-
---
2-
###########################
3-
###########################
4-
## Linter GitHub Actions ##
5-
###########################
6-
###########################
71
name: Lint Code Base
82

9-
#
10-
# Documentation:
11-
# https://help.github.com/en/articles/workflow-syntax-for-github-actions
12-
#
13-
14-
#############################
15-
# Start the job on all push #
16-
#############################
173
on:
184
push:
19-
branches-ignore:
20-
- 'master'
5+
branches:
6+
- master
7+
pull_request:
8+
type:
9+
- opened
10+
- synchronize
2111

22-
###############
23-
# Set the Job #
24-
###############
2512
jobs:
2613
build:
27-
# Name the Job
2814
name: Lint Code Base
29-
# Set the agent to run on
3015
runs-on: ubuntu-latest
3116

32-
##################
33-
# Load all steps #
34-
##################
3517
steps:
36-
##########################
37-
# Checkout the code base #
38-
##########################
3918
- name: Checkout Code
4019
uses: actions/checkout@v2
4120

42-
################################
43-
# Run Linter against code base #
44-
################################
4521
- name: Lint Code Base
4622
uses: docker://github/super-linter:v3
4723
env:

0 commit comments

Comments
 (0)