Skip to content

Commit

Permalink
chore: update github actions to be able to reproduce using act
Browse files Browse the repository at this point in the history
  • Loading branch information
Nepo26 committed Sep 10, 2023
1 parent b14e524 commit 36712d5
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
types: [opened, reopened]

jobs:
goreleaser:
build:
runs-on: ubuntu-latest
env:
DOCKER_CLI_EXPERIMENTAL: "enabled"
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- "*"

jobs:
goreleaser:
release:
runs-on: ubuntu-latest
env:
DOCKER_CLI_EXPERIMENTAL: "enabled"
Expand All @@ -22,13 +22,17 @@ jobs:
with:
go-version: '^1.18.0'
- name: Login to Docker hub
if: ${{ !env.ACT }}
run: docker login -u ${{ secrets.DOCKER_HUB_USER }} -p ${{ secrets.DOCKER_HUB_PASSWORD }}
- name: Import GPG key
if: ${{ !env.ACT }}
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v4
uses: crazy-max/ghaction-import-gpg@v5
with:
gpg_private_key: ${{ secrets.SIGNING_KEY }}
- uses: goreleaser/goreleaser-action@v4
- name: Release Helm-Docs
if: ${{ !env.ACT }}
uses: goreleaser/goreleaser-action@v4
with:
args: release
env:
Expand Down
9 changes: 9 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,12 @@ To run benchmarks, run the command:
```
go test -run=^$ -bench=. ./cmd/helm-docs
```

### Github Actions
You may use [act](https://github.com/nektos/act) to test

locally the workflow.By issuing the following command you can
see if a release will work as expected.
```bash
act -j release
```

0 comments on commit 36712d5

Please sign in to comment.