Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

chore: Bump step-security/harden-runner from 2.5.1 to 2.7.0 #137

chore: Bump step-security/harden-runner from 2.5.1 to 2.7.0

chore: Bump step-security/harden-runner from 2.5.1 to 2.7.0 #137

name: build:binaries
on:
pull_request:
paths-ignore:
- '**/*.md'
env:
BINARY_PREFIX: ${{ github.repository }}
jobs:
build:
strategy:
matrix:
go-version: [1.18.x, 1.19.x]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # 2.7.0
with:
egress-policy: block
disable-telemetry: true
allowed-endpoints: >
artifactcache.actions.githubusercontent.com:443
github.com:443
proxy.golang.org:443
storage.googleapis.com:443
- name: Setup golang environment
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
cache: false
- name: Check out code
uses: actions/checkout@v4
- name: Restore go modules cache
uses: actions/cache@v3
with:
# In order:
# * Module download cache
# * Build cache (Linux)
# * Build cache (Mac)
# * Build cache (Windows)
path: |
~/go/pkg/mod
~/.cache/go-build
~/Library/Caches/go-build
~\AppData\Local\go-build
key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-${{ matrix.go-version }}-
- name: Download dependencies
run: go mod download
- name: Build source code
run: go build -v -o ${{ env.BINARY_PREFIX }}-${{ runner.os }}-${{ matrix.go-version }}