Skip to content

Update actions/cache action to v4 (#16) #15

Update actions/cache action to v4 (#16)

Update actions/cache action to v4 (#16) #15

Workflow file for this run

name: gofmt
on:
push:
branches:
- main
pull_request:
paths:
- '.github/workflows/gofmt.yml'
- '**.go'
jobs:
gofmt:
name: Run gofmt
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.17
uses: actions/setup-go@v1
with:
go-version: 1.17
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v1
- uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-gofmt1.17-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-gofmt1.17-
- name: gofmt
run: |
gofmt -s -w ./