Skip to content

Commit ad2eee3

Browse files
committed
Update actions workflows
1 parent bbe5f09 commit ad2eee3

4 files changed

Lines changed: 68 additions & 41 deletions

File tree

.github/workflows/linting.yml

Lines changed: 31 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,42 @@
11
---
2+
name: lint
23

3-
###
4-
### Lints all generic and json files in the whole git repository
5-
###
6-
7-
name: linting
84
on:
95
pull_request:
10-
push:
11-
branches:
12-
- master
13-
tags:
146

157
jobs:
168
lint:
9+
name: "Lint"
1710
runs-on: ubuntu-latest
11+
strategy:
12+
fail-fast: False
13+
matrix:
14+
target:
15+
- lint
16+
- gen
17+
1818
steps:
1919
- name: Checkout repository
20-
uses: actions/checkout@master
21-
22-
- name: Terraform lint
23-
uses: actionshub/terraform-lint@main
24-
25-
- name: Files lint
20+
uses: actions/checkout@v5
21+
with:
22+
fetch-depth: 0
23+
- name: "make ${{ matrix.target }}"
2624
run: |
27-
make "lint-files"
25+
retry() {
26+
for n in $(seq ${RETRIES}); do
27+
echo "[${n}/${RETRIES}] ${*}";
28+
if eval "${*}"; then
29+
echo "[SUCC] ${n}/${RETRIES}";
30+
return 0;
31+
fi;
32+
sleep 2;
33+
echo "[FAIL] ${n}/${RETRIES}";
34+
done;
35+
return 1;
36+
}
37+
38+
retry make "${TARGET}"
39+
git diff --quiet || { echo "Build Changes"; git diff; git status; false; }
40+
env:
41+
TARGET: ${{ matrix.target }}
42+
RETRIES: 20
Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
1+
---
12
name: Release Drafter
23

34
on:
45
push:
5-
# branches to consider in the event; optional, defaults to all
66
branches:
77
- master
88

99
permissions:
10-
contents: read
10+
contents: write
11+
pull-requests: write
1112

1213
jobs:
1314
update_release_draft:
14-
permissions:
15-
contents: write
1615
runs-on: ubuntu-latest
1716
steps:
18-
- uses: release-drafter/release-drafter@v5
17+
- uses: release-drafter/release-drafter@v6
1918
env:
2019
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/terraform-docs.yml

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

.github/workflows/test.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
name: test
3+
4+
on:
5+
pull_request:
6+
7+
jobs:
8+
test:
9+
name: Test
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v5
14+
with:
15+
fetch-depth: 0
16+
17+
- name: Test
18+
run: |
19+
retry() {
20+
for n in $(seq ${RETRIES}); do
21+
echo "[${n}/${RETRIES}] ${*}";
22+
if eval "${*}"; then
23+
echo "[SUCC] ${n}/${RETRIES}";
24+
return 0;
25+
fi;
26+
sleep 2;
27+
echo "[FAIL] ${n}/${RETRIES}";
28+
done;
29+
return 1;
30+
}
31+
retry make test
32+
env:
33+
RETRIES: 20

0 commit comments

Comments
 (0)