You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit a3accd7
Browse filesBrowse the repository at this point in the historyBrowse files
echo"::error file=$lockfile,title=Base branch not fetched::Could not fetch the base branch, so the check cannot tell whether it has $lockfile."
78
+
exit 1
79
+
fi
80
+
if git cat-file -e "origin/$base_ref:$lockfile"2>/dev/null;then
81
+
base_has_lockfile=true
82
+
fi
83
+
fi
84
+
85
+
# Runs `gh actions-lock` once, to make the lockfile and rewrite the workflows as it would, for the annotation.
86
+
make_lock() {
87
+
shielded gh actions-lock --no-interactive
88
+
lock_status=$status
89
+
if [ "$lock_status"-ne 0 ];then
90
+
echo"::error title=gh actions-lock failed::gh actions-lock itself failed (exit status $lock_status); this is not a finding about the workflows. See the log."
91
+
fi
92
+
}
93
+
94
+
if [ !-f"$lockfile" ];then
95
+
make_lock
96
+
if [ "$base_has_lockfile"=true ];then
97
+
report error "Workflow lockfile deleted" \
98
+
"$lockfile is on the base branch $base_ref but is missing here. Restore it, or run gh actions-lock. gh actions-lock made these changes:"
99
+
exit 1
100
+
fi
101
+
report warning "No workflow lockfile yet" \
102
+
"Not checked: $lockfile is not committed. gh actions-lock would make these changes:"
# Go's module proxy and checksum database verify the pinned version. shellcheck, which actionlint uses for
22
-
# `run:` scripts, is preinstalled on ubuntu-latest.
29
+
# `run:` scripts, is preinstalled on ubuntu-latest. Files are named explicitly so the example caller workflows,
30
+
# which are not under .github/workflows, are linted too.
23
31
- name: actionlint
24
-
run: go run github.com/rhysd/actionlint/cmd/actionlint@v1.7.12 -color
32
+
run: go run github.com/rhysd/actionlint/cmd/actionlint@v1.7.12 -color .github/workflows/*.yml examples/*.yml
33
+
34
+
# Audits the workflows, the example callers and the Dependabot configuration for security problems. Fails on any
35
+
# finding, of any severity, with zizmor's default ("regular") persona. zizmor exits with 11 to 14 when it has
36
+
# findings, whatever the output format; only --format=sarif and --no-exit-codes (and --fix, once it fixed
37
+
# everything) turn that off, so --format=github fails the job. See "Exit codes" at https://docs.zizmor.sh/usage/. A finding is either fixed or accepted with
38
+
# an inline `# zizmor: ignore[<audit>] <reason>` comment on the line zizmor reports. Findings show as annotations
0 commit comments