Skip to content

Commit

Permalink
feat(ci): auto go mod tidy examples (charmbracelet#561)
Browse files Browse the repository at this point in the history
* feat(ci): auto go mod tidy examples

Signed-off-by: Carlos A Becker <[email protected]>

* fix: tutorials as well

* fix: checkout

---------

Signed-off-by: Carlos A Becker <[email protected]>
  • Loading branch information
caarlos0 authored Feb 23, 2023
1 parent ae652b6 commit 32e3027
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: examples

on:
push:
branches:
- 'master'
paths:
- '.github/workflows/examples.yml'
- './examples/go.mod'
- './examples/go.sum'
- './tutorials/go.mod'
- './tutorials/go.sum'
- './go.mod'
- './go.sum'
workflow_dispatch: {}

jobs:
tidy:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '^1'
cache: true
- shell: bash
run: |
(cd ./examples && go mod tidy)
(cd ./tutorials && go mod tidy)
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "chore: go mod tidy tutorials and examples"
branch: master
commit_user_name: actions-user
commit_user_email: [email protected]

0 comments on commit 32e3027

Please sign in to comment.