Skip to content

Commit

Permalink
cicd: fix nightly-ci error
Browse files Browse the repository at this point in the history
This fixes the nightly-ci workflow and adds a means to lint and validate
the workflow files.

Signed-off-by: Hank Donnay <hdonnay@redhat.com>
  • Loading branch information
hdonnay committed Jun 15, 2023
1 parent 5226d2a commit 7e2ae8f
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
yq
yajsv
*.json-schema
6 changes: 6 additions & 0 deletions .github/workflows/.yamllint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
extends: default
rules:
line-length: false
truthy:
check-keys: false
19 changes: 19 additions & 0 deletions .github/workflows/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
check: github-workflow.json-schema yajsv yq
for f in *.yml; do ./yq -o json "$$f" > "$${f%yml}json"; done
./yajsv -s $< *.json
rm *.json
command -v yamllint >/dev/null 2>&1 && yamllint .

clean:
rm -rf yq yajsv github-workflow.json-schema

.PHONY: check clean

yq:
cd /tmp && GOBIN=$(PWD) go install github.com/mikefarah/yq/v4@latest

yajsv:
cd /tmp && GOBIN=$(PWD) go install github.com/neilpa/yajsv@latest

github-workflow.json-schema:
curl -sSLf https://github.com/SchemaStore/schemastore/raw/master/src/schemas/json/github-workflow.json > $@
2 changes: 1 addition & 1 deletion .github/workflows/config-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
run: |
echo 'go_versions=["1.20", "1.19"]' >> "$GITHUB_OUTPUT"
commit-check:
commit-check:
name: Commit Check
runs-on: ubuntu-latest
steps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ jobs:
name: Integration Tests
needs: ['config']
runs-on: ubuntu-latest
env:
services:
# These will be used by a container on the same docker network, so no need to expose ports.
postgres:
Expand Down Expand Up @@ -62,7 +61,7 @@ jobs:
with:
platforms: linux/${{ matrix.platform }}
- name: Make directories on cache miss
run: mkdir -p "$(go env GOMODCACHE)" "$(go env GOCACHE)"
run: mkdir -p "$(go env GOMODCACHE)" "$(go env GOCACHE)"
if: ${{ ! steps.cache.outputs.cache-hit }}
- name: Configure RabbitMQ
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prepare-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
filter_tag="--tag-filter-pattern v4"
branch=${{ github.event.inputs.branch }}
echo "discovered branch $branch"
if [[ ${branch%-*} == "release" ]]; then
if [[ ${branch%-*} == "release" ]]; then
filter_tag="--tag-filter-pattern v${branch#release-}"
fi
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/v2-issues.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: 'Manage v2 Issues'
on:
workflow_dispatch:
Expand Down

0 comments on commit 7e2ae8f

Please sign in to comment.