Skip to content

Commit 7e2ae8f

Browse files
committed
cicd: fix nightly-ci error
This fixes the nightly-ci workflow and adds a means to lint and validate the workflow files. Signed-off-by: Hank Donnay <[email protected]>
1 parent 5226d2a commit 7e2ae8f

File tree

7 files changed

+32
-4
lines changed

7 files changed

+32
-4
lines changed

.github/workflows/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
yq
2+
yajsv
3+
*.json-schema

.github/workflows/.yamllint.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
extends: default
3+
rules:
4+
line-length: false
5+
truthy:
6+
check-keys: false

.github/workflows/Makefile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
check: github-workflow.json-schema yajsv yq
2+
for f in *.yml; do ./yq -o json "$$f" > "$${f%yml}json"; done
3+
./yajsv -s $< *.json
4+
rm *.json
5+
command -v yamllint >/dev/null 2>&1 && yamllint .
6+
7+
clean:
8+
rm -rf yq yajsv github-workflow.json-schema
9+
10+
.PHONY: check clean
11+
12+
yq:
13+
cd /tmp && GOBIN=$(PWD) go install github.com/mikefarah/yq/v4@latest
14+
15+
yajsv:
16+
cd /tmp && GOBIN=$(PWD) go install github.com/neilpa/yajsv@latest
17+
18+
github-workflow.json-schema:
19+
curl -sSLf https://github.com/SchemaStore/schemastore/raw/master/src/schemas/json/github-workflow.json > $@

.github/workflows/config-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
run: |
2626
echo 'go_versions=["1.20", "1.19"]' >> "$GITHUB_OUTPUT"
2727
28-
commit-check:
28+
commit-check:
2929
name: Commit Check
3030
runs-on: ubuntu-latest
3131
steps:

.github/workflows/nightly-ci.yaml renamed to .github/workflows/nightly-ci.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ jobs:
2121
name: Integration Tests
2222
needs: ['config']
2323
runs-on: ubuntu-latest
24-
env:
2524
services:
2625
# These will be used by a container on the same docker network, so no need to expose ports.
2726
postgres:
@@ -62,7 +61,7 @@ jobs:
6261
with:
6362
platforms: linux/${{ matrix.platform }}
6463
- name: Make directories on cache miss
65-
run: mkdir -p "$(go env GOMODCACHE)" "$(go env GOCACHE)"
64+
run: mkdir -p "$(go env GOMODCACHE)" "$(go env GOCACHE)"
6665
if: ${{ ! steps.cache.outputs.cache-hit }}
6766
- name: Configure RabbitMQ
6867
run: |

.github/workflows/prepare-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
filter_tag="--tag-filter-pattern v4"
4040
branch=${{ github.event.inputs.branch }}
4141
echo "discovered branch $branch"
42-
if [[ ${branch%-*} == "release" ]]; then
42+
if [[ ${branch%-*} == "release" ]]; then
4343
filter_tag="--tag-filter-pattern v${branch#release-}"
4444
fi
4545

.github/workflows/v2-issues.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
name: 'Manage v2 Issues'
23
on:
34
workflow_dispatch:

0 commit comments

Comments
 (0)