Skip to content

Commit 8752929

Browse files
Merge pull request #14 from devops-infra/feature/workflow-synce
Synced workflows with other repos. Updated PR template. Added cron build job.
2 parents add185a + f35cc89 commit 8752929

File tree

9 files changed

+100
-142
lines changed

9 files changed

+100
-142
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,24 @@
1-
### Brief description:
2-
1+
## :memo: Brief description
32

43
<!-- Write you description here -->
54

5+
<!-- Diff summary - START -->
6+
<!-- Diff summary - END -->
7+
8+
9+
## :computer: Commits
10+
<!-- Diff commits - START -->
11+
<!-- Diff commits - END -->
12+
13+
14+
## :file_folder: Modified files
15+
<!-- Diff files - START -->
16+
<!-- Diff files - END -->
17+
618

7-
### Checklist
19+
### :warning: Additional information
20+
* [ ] Pushed to a branch with a proper name and provided proper commit message.
821
* [ ] Provided a clear and concise description of what the issue is.
9-
* [ ] Given a clear and concise description of what is expected.
10-
* [ ] Proposed a clear and concise description of any alternative solutions or other features.
11-
* [ ] Added any other context or screenshots about the feature request.
12-
* [ ] Associated issue has been already created and link was provided.
1322

1423

1524
*Check [CONTRIBUTING.md](../blob/master/.github/CONTRIBUTING.md) for more information*

.github/PULL_REQUEST_TEMPLATE/BUGFIX.md

Lines changed: 0 additions & 23 deletions
This file was deleted.

.github/PULL_REQUEST_TEMPLATE/DEPENDENCY.md

Lines changed: 0 additions & 21 deletions
This file was deleted.

.github/PULL_REQUEST_TEMPLATE/DOCUMENTATION.md

Lines changed: 0 additions & 22 deletions
This file was deleted.

.github/PULL_REQUEST_TEMPLATE/FEATURE.md

Lines changed: 0 additions & 24 deletions
This file was deleted.

.github/workflows/CRON.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Check for updates
2+
3+
on:
4+
schedule:
5+
# Run every week at 5.00 AM UTC
6+
- cron: "0 5 */7 * *"
7+
8+
jobs:
9+
build_and_push:
10+
name: Build and push images
11+
needs: lint
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/[email protected]
16+
17+
- name: Build Docker image and push to registry
18+
env:
19+
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
20+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21+
TERM: xterm-256color
22+
run: make build push

.github/workflows/PUSH-MASTER.yml

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,51 @@
1-
name: Master branch
1+
name: Push to master
22

33
on:
44
push:
5-
branches: master
5+
branches:
6+
- master
67

78
jobs:
89
labels:
910
name: Update repo labels
1011
runs-on: ubuntu-latest
1112
steps:
1213
- name: Checkout repository
13-
uses: actions/checkout@v2
14+
uses: actions/checkout@v2.3.4
1415

1516
- name: Update labels
16-
uses: crazy-max/ghaction-github-labeler@v1
17-
env:
18-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17+
uses: crazy-max/ghaction-github-labeler@v3.1.1
18+
with:
19+
github-token: ${{ secrets.GITHUB_TOKEN }}
1920

2021
lint:
2122
name: Run linters
2223
runs-on: ubuntu-latest
2324
steps:
2425
- name: Checkout repository
25-
uses: actions/checkout@v2
26+
uses: actions/checkout@v2.3.4
2627

2728
- name: Docker Lint
28-
uses: luke142367/Docker-Lint-Action@v1.0.0
29+
uses: luke142367/Docker-Lint-Action@v1.1.1
2930
env:
3031
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3132

33+
- name: Haskell Dockerfile Linter (Hadolint)
34+
uses: brpaz/[email protected]
35+
with:
36+
dockerfile: Dockerfile
37+
3238
build_and_push:
33-
name: Build and push to DockerHub
39+
name: Build and push images
3440
needs: lint
3541
runs-on: ubuntu-latest
3642
steps:
3743
- name: Checkout repository
38-
uses: actions/checkout@v2
44+
uses: actions/checkout@v2.3.4
3945

4046
- name: Build Docker image and push to registry
4147
env:
4248
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
49+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4350
TERM: xterm-256color
4451
run: make build push

.github/workflows/PUSH-OTHER.yml

Lines changed: 43 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Other branches
1+
name: Push to other branches
22

33
on:
44
push:
@@ -12,34 +12,38 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Checkout repository
15-
uses: actions/checkout@v2
15+
uses: actions/checkout@v2.3.4
1616

1717
- name: Update labels - dry run
18-
uses: crazy-max/ghaction-github-labeler@v1
18+
uses: crazy-max/ghaction-github-labeler@v3.1.1
1919
with:
20-
dry_run: true
21-
env:
22-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20+
github-token: ${{ secrets.GITHUB_TOKEN }}
21+
dry-run: true
2322

2423
lint:
2524
name: Run linters
2625
runs-on: ubuntu-latest
2726
steps:
2827
- name: Checkout repository
29-
uses: actions/checkout@v2
28+
uses: actions/checkout@v2.3.4
3029

3130
- name: Docker Lint
32-
uses: luke142367/Docker-Lint-Action@v1.0.0
31+
uses: luke142367/Docker-Lint-Action@v1.1.1
3332
env:
3433
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3534

35+
- name: Haskell Dockerfile Linter (Hadolint)
36+
uses: brpaz/[email protected]
37+
with:
38+
dockerfile: Dockerfile
39+
3640
build:
3741
name: Build image
3842
needs: lint
3943
runs-on: ubuntu-latest
4044
steps:
4145
- name: Checkout repository
42-
uses: actions/checkout@v2
46+
uses: actions/checkout@v2.3.4
4347

4448
- name: Build Docker image
4549
env:
@@ -51,30 +55,38 @@ jobs:
5155
runs-on: ubuntu-latest
5256
steps:
5357
- name: Checkout repository
54-
uses: actions/checkout@v2
58+
uses: actions/[email protected]
59+
with:
60+
fetch-depth: 0
61+
62+
- name: Create pull request - bugfix (conditional)
63+
if: startsWith(github.ref, 'refs/heads/bugfix')
64+
uses: devops-infra/action-pull-request@master
65+
with:
66+
github_token: ${{ secrets.GITHUB_TOKEN }}
67+
assignee: ${{ github.actor }}
68+
label: bugfix
69+
template: .github/PULL_REQUEST_TEMPLATE.md
70+
get_diff: true
5571

5672
- name: Create pull request - dependency (conditional)
5773
if: startsWith(github.ref, 'refs/heads/dependency')
5874
uses: devops-infra/action-pull-request@master
5975
with:
6076
github_token: ${{ secrets.GITHUB_TOKEN }}
6177
assignee: ${{ github.actor }}
62-
label: automatic,dependency
63-
template: .github/PULL_REQUEST_TEMPLATE/DEPENDENCY.md
64-
old_string: "<!-- Write you description here -->"
65-
new_string: ${{ github.event.commits[0].message }}
78+
label: dependency
79+
template: .github/PULL_REQUEST_TEMPLATE.md
6680
get_diff: true
6781

68-
- name: Create pull request - bugfix (conditional)
69-
if: startsWith(github.ref, 'refs/heads/bugfix')
82+
- name: Create pull request - documentation (conditional)
83+
if: startsWith(github.ref, 'refs/heads/documentation')
7084
uses: devops-infra/action-pull-request@master
7185
with:
7286
github_token: ${{ secrets.GITHUB_TOKEN }}
7387
assignee: ${{ github.actor }}
74-
label: automatic,bugfix
75-
template: .github/PULL_REQUEST_TEMPLATE/BUGFIX.md
76-
old_string: "<!-- Write you description here -->"
77-
new_string: ${{ github.event.commits[0].message }}
88+
label: documentation
89+
template: .github/PULL_REQUEST_TEMPLATE.md
7890
get_diff: true
7991

8092
- name: Create pull request - feature (conditional)
@@ -83,32 +95,28 @@ jobs:
8395
with:
8496
github_token: ${{ secrets.GITHUB_TOKEN }}
8597
assignee: ${{ github.actor }}
86-
label: automatic,feature
87-
template: .github/PULL_REQUEST_TEMPLATE/FEATURE.md
88-
old_string: "<!-- Write you description here -->"
89-
new_string: ${{ github.event.commits[0].message }}
98+
label: feature
99+
template: .github/PULL_REQUEST_TEMPLATE.md
90100
get_diff: true
91101

92-
- name: Create pull request - documentation (conditional)
93-
if: startsWith(github.ref, 'refs/heads/documentation')
102+
- name: Create pull request - test (conditional)
103+
if: startsWith(github.ref, 'refs/heads/test')
94104
uses: devops-infra/action-pull-request@master
95105
with:
96106
github_token: ${{ secrets.GITHUB_TOKEN }}
97107
assignee: ${{ github.actor }}
98-
label: automatic,documentation
99-
template: .github/PULL_REQUEST_TEMPLATE/DOCUMENTATION.md
100-
old_string: "<!-- Write you description here -->"
101-
new_string: ${{ github.event.commits[0].message }}
108+
reviewer: ${{ github.actor }}
109+
label: test
110+
template: .github/PULL_REQUEST_TEMPLATE.md
111+
draft: true
102112
get_diff: true
103113

104114
- name: Create pull request - other (conditional)
105-
if: startsWith(github.ref, '!refs/heads/dependency') && startsWith(github.ref, '!refs/heads/bugfix') && startsWith(github.ref, '!refs/heads/feature') && startsWith(github.ref, '!refs/heads/documentation')
115+
if: "!startsWith(github.ref, 'refs/heads/bugfix') && !startsWith(github.ref, 'refs/heads/dependabot') && !startsWith(github.ref, 'refs/heads/dependency') && !startsWith(github.ref, 'refs/heads/documentation') && !startsWith(github.ref, 'refs/heads/feature') && !startsWith(github.ref, 'refs/heads/test')"
106116
uses: devops-infra/action-pull-request@master
107117
with:
108118
github_token: ${{ secrets.GITHUB_TOKEN }}
109119
assignee: ${{ github.actor }}
110-
label: automatic,feature
111-
template: .github/PULL_REQUEST_TEMPLATE/FEATURE.md
112-
old_string: "<!-- Write you description here -->"
113-
new_string: ${{ github.event.commits[0].message }}
120+
label: feature
121+
template: .github/PULL_REQUEST_TEMPLATE.md
114122
get_diff: true

Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ LABEL \
4646
COPY entrypoint.sh /
4747

4848
# Install needed packages
49+
# hadolint ignore=DL3017,DL3018
4950
RUN set -eux \
5051
&& chmod +x /entrypoint.sh \
5152
&& apk update --no-cache \
@@ -57,4 +58,5 @@ RUN set -eux \
5758

5859
# Finish up
5960
WORKDIR /github/workspace
61+
# hadolint ignore=DL3025
6062
ENTRYPOINT /entrypoint.sh

0 commit comments

Comments
 (0)