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

Commit ed8a551

Browse files
linting (#14)
- linting - fixing auto-update - markdown help - applied asciiart & copyright - switch master to main branch - fixed broken merge
1 parent 1b50d74 commit ed8a551

File tree

153 files changed

+1943
-1036
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

153 files changed

+1943
-1036
lines changed

.github/linters/.hadolint.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
ignored:
22
- DL3008 # Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`
3-
- DL3018 # Pin versions in apk add. Instead of `apk add <package>` use `apk add <package>=<version>`
3+
- DL3018 # Pin versions in apk add. Instead of `apk add <package>` use `apk add <package>=<version>`
4+
- DL3033 # Specify version with `yum install -y <package>-<version>`.

.github/linters/.markdown-lint.yml

+7
Original file line numberDiff line numberDiff line change
@@ -1 +1,8 @@
11
line-length: false
2+
MD033:
3+
allowed_elements:
4+
- details
5+
- summary
6+
MD026:
7+
punctuation: ".,;:!。,;:!?"
8+
MD038: false

.github/workflows/anchore-analysis.yml

+9-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@
55
# information on Anchore's container image scanning tool Grype, see
66
# https://github.com/anchore/grype
77
name: Anchore Container Scan
8-
on: push
8+
9+
on:
10+
push:
11+
branches:
12+
- main
13+
914
jobs:
1015
Anchore-Build-Scan:
1116
runs-on: ubuntu-latest
@@ -15,7 +20,9 @@ jobs:
1520

1621
- name: Check docker changes
1722
id: docker_changes
18-
run: git diff-tree --no-commit-id --name-only -r HEAD nginx tpl | wc -l | tr -d ' '
23+
run: git diff-tree --no-commit-id --name-only -r ${SHA:-HEAD} nginx tpl | wc -l | tr -d ' '
24+
env:
25+
SHA: ${{ github.sha }}
1926

2027
- name: Build the Docker image
2128
if: steps.docker_changes.output != '0'

.github/workflows/autoupdate.yml

+15-4
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,15 @@ jobs:
1616
id: auto-update-and-commit
1717
run: make auto-update-and-commit
1818

19+
- name: Archive metadata artifacts
20+
uses: actions/upload-artifact@v2
21+
if: steps.auto-update-and-commit.outputs == '0'
22+
with:
23+
name: broken-docker-update
24+
path: /tmp/generate-supported-versions
25+
retention-days: 5
26+
if-no-files-found: ignore
27+
1928
- name: cancelling
2029
uses: andymckay/[email protected]
2130
if: steps.auto-update-and-commit.outputs == '0'
@@ -37,7 +46,9 @@ jobs:
3746

3847
- name: Check docker changes
3948
id: docker_changes
40-
run: git diff-tree --no-commit-id --name-only -r HEAD nginx tpl | wc -l | tr -d ' '
49+
run: git diff-tree --no-commit-id --name-only -r ${SHA:-HEAD} nginx tpl | wc -l | tr -d ' '
50+
env:
51+
SHA: ${{ github.sha }}
4152

4253
- name: Cleanup metadata artifacts
4354
run: rm -rf docs/metadata/*
@@ -53,11 +64,11 @@ jobs:
5364

5465
- name: Log into registry
5566
run: echo "${{ secrets.DOCKER_HUB_TOKEN }}" | docker login -u ${{ github.actor }} --password-stdin
56-
if: github.ref == 'refs/heads/master' && steps.docker_changes.output != '0'
67+
if: github.ref == 'refs/heads/main' && steps.docker_changes.output != '0'
5768

5869
- name: Push images
5970
run: make push-${{ matrix.distro }}
60-
if: github.ref == 'refs/heads/master' && steps.docker_changes.output != '0'
71+
if: github.ref == 'refs/heads/main' && steps.docker_changes.output != '0'
6172

6273
- name: Archive metadata artifacts
6374
uses: actions/upload-artifact@v2
@@ -112,7 +123,7 @@ jobs:
112123

113124
- name: Push metadata
114125
run: make auto-commit-metadata
115-
if: github.ref == 'refs/heads/master'
126+
if: github.ref == 'refs/heads/main'
116127

117128
auto_tag:
118129
name: Create Release

.github/workflows/linter.yml

+2-9
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
name: Lint Code Base
22

3-
on:
4-
push:
5-
branches:
6-
- master
7-
pull_request:
8-
type:
9-
- opened
10-
- synchronize
3+
on: push
114

125
jobs:
136
build:
@@ -24,4 +17,4 @@ jobs:
2417
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
2518
VALIDATE_ALL_CODEBASE: true
2619
DOCKERFILE_HADOLINT_FILE_NAME: .hadolint.yml
27-
FILTER_REGEX_EXCLUDE: "nginx/(1.17.10|1.18.0|1.19.0|1.19.1|1.19.2)"
20+
FILTER_REGEX_EXCLUDE: "nginx/(1.17.10|1.18.0|1.19.0|1.19.1|1.19.2)|tpl/.+.sh"

.github/workflows/main.yml

+7-5
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Docker Builds
33
on:
44
push:
55
branches:
6-
- master
6+
- main
77
pull_request:
88
type:
99
- opened
@@ -23,7 +23,9 @@ jobs:
2323

2424
- name: Check docker changes
2525
id: docker_changes
26-
run: git diff-tree --no-commit-id --name-only -r HEAD nginx tpl | wc -l | tr -d ' '
26+
run: git diff-tree --no-commit-id --name-only -r ${SHA:-HEAD} nginx tpl | wc -l | tr -d ' '
27+
env:
28+
SHA: ${{ github.sha }}
2729

2830
- name: Cleanup metadata artifacts
2931
run: rm -rf docs/metadata/*
@@ -39,11 +41,11 @@ jobs:
3941

4042
- name: Log into registry
4143
run: echo "${{ secrets.DOCKER_HUB_TOKEN }}" | docker login -u ${{ github.actor }} --password-stdin
42-
if: github.ref == 'refs/heads/master' && steps.docker_changes.output != '0'
44+
if: github.ref == 'refs/heads/main' && steps.docker_changes.output != '0'
4345

4446
- name: Push images
4547
run: make push-${{ matrix.distro }}
46-
if: github.ref == 'refs/heads/master' && steps.docker_changes.output != '0'
48+
if: github.ref == 'refs/heads/main' && steps.docker_changes.output != '0'
4749

4850
- name: Archive metadata artifacts
4951
uses: actions/upload-artifact@v2
@@ -99,4 +101,4 @@ jobs:
99101

100102
- name: Push metadata
101103
run: make auto-commit-metadata
102-
if: github.ref == 'refs/heads/master'
104+
if: github.ref == 'refs/heads/main'

.github/workflows/snyk-analysis.yml

+9-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,12 @@
77
# fail PR checks for new vulnerabilities, see https://github.com/snyk/actions/
88

99
name: Snyk Container
10-
on: push
10+
11+
on:
12+
push:
13+
branches:
14+
- main
15+
1116
jobs:
1217
snyk:
1318
runs-on: ubuntu-latest
@@ -16,7 +21,9 @@ jobs:
1621

1722
- name: Check docker changes
1823
id: docker_changes
19-
run: git diff-tree --no-commit-id --name-only -r HEAD nginx tpl | wc -l | tr -d ' '
24+
run: git diff-tree --no-commit-id --name-only -r ${SHA:-HEAD} nginx tpl | wc -l | tr -d ' '
25+
env:
26+
SHA: ${{ github.sha }}
2027

2128
- name: Build a Docker image
2229
if: steps.docker_changes.output != '0'

0 commit comments

Comments
 (0)