build(deps): Bump step-security/harden-runner from 2.4.1 to 2.5.0 #833
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright Contributors to the L3AF Project. | |
# SPDX-License-Identifier: Apache-2.0 | |
# | |
# For documentation on the github environment, see | |
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners | |
# | |
# For documentation on the syntax of this file, see | |
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions | |
name: CI Windows build | |
on: | |
pull_request: {} | |
push: | |
branches: | |
- main | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- name: Setup Go 1.18.6 | |
uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 | |
with: | |
go-version: '1.18.6' | |
- name: Harden Runner | |
uses: step-security/harden-runner@cba0d00b1fc9a034e1e642ea0f1103c282990604 | |
with: | |
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs | |
- name: Set up git env | |
run: | | |
git config --global core.autocrlf false | |
$gopath = (go env GOPATH) | |
echo "GOPATH=$gopath" >> $env:GITHUB_ENV | |
- name: Checkout repository | |
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 | |
- name: Format | |
run: | | |
go install golang.org/x/tools/cmd/goimports@latest | |
$goimp = (Join-path -Path (go env GOPATH) -ChildPath "\bin\goimports") | |
$res = (&$goimp -l .) -replace "$_" | |
if ($res -ne "") { | |
echo "Unformatted source code:" | |
echo $res | |
exit 1 | |
} | |
- name: Vet | |
run: | | |
go vet -tags WINDOWS ./... | |
- name: Test | |
run: | | |
go test -tags WINDOWS ./... | |
- uses: dominikh/staticcheck-action@ba605356b4b29a60e87ab9404b712f3461e566dc | |
with: | |
version: "2022.1.1" | |
install-go: false | |
build-tags: WINDOWS | |
- name: Build | |
env: | |
GOPATH: ${{env.GOPATH}} | |
run: | | |
cmake -B build | |
cmake --build build |