Skip to content

Commit

Permalink
GHA: remove skip-cache input variable, update examples (joelanford#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
joelanford authored Aug 29, 2023
1 parent 1b07783 commit 0511785
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 23 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/go-apidiff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ jobs:
go-apidiff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-go@v1
- uses: actions/setup-go@v4
with:
go-version: 1.18.x
go-version-file: go.mod
- uses: ./

10 changes: 3 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ Print compatible API changes (default: `true`)

Path to root of git repository to compare (default: current working directory)

#### `skip-cache`

Skip automatic caching of go module directories (default: `false`)

### Outputs

#### `semver-type`
Expand All @@ -50,12 +46,12 @@ jobs:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-go@v2
- uses: actions/setup-go@v4
with:
go-version: "1.18"
go-version-file: go.mod
- uses: joelanford/go-apidiff@main
```
Expand Down
13 changes: 0 additions & 13 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,26 +24,13 @@ inputs:
description: 'Path to root of git repository to compare'
required: false
default: '.'
skip-cache:
description: 'Skip automatic caching of go module directories'
required: false
default: false
outputs:
semver-type:
description: "Returns the type (patch, minor, major) of the sementic version that would be required if producing a release."
value: ${{ steps.go-apidiff.outputs.semver-type }}
runs:
using: 'composite'
steps:
- uses: actions/cache@v3
if: ${{ inputs.skip-cache != 'true' }}
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-apidiff-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-apidiff
- shell: bash
id: go-apidiff
run: |
Expand Down

0 comments on commit 0511785

Please sign in to comment.