feat: add limitations for act when run locally to only test the charts and process (no release)

This commit is contained in:
Tommy 2024-04-10 12:20:46 +02:00
parent 088bee6b9a
commit daf6b7e136
No known key found for this signature in database
2 changed files with 12 additions and 7 deletions

View file

@ -122,6 +122,7 @@ jobs:
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
@ -147,6 +148,7 @@ jobs:
- name: Run Chart Releaser
id: release_step
if: ( !env.ACT && ( success() || failure() ) )
uses: helm/chart-releaser-action@v1.6.0
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
@ -172,6 +174,7 @@ jobs:
path: charts
- name: Commit charts CHANGELOG.md file
if: ( !env.ACT && ( success() || failure() ) )
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"

View file

@ -6,18 +6,20 @@ vars:
tasks:
test:
silent: false
interactive: true
cmds:
- act --var-file secrets.env --artifact-server-path /tmp/artifacts
- act --artifact-server-path /tmp/artifacts --container-architecture linux/amd64 -s GITHUB_TOKEN="$(gh auth token)"
validate:
desc: Validate charts
silent: "False"
cmds:
- |
for f in $(ls -d charts/* | fgrep -v '.yaml')
helm lint $f
end
silent: false
cmds:
- |
for f in $(ls -d charts/* | fgrep -v '.yaml')
helm lint $f
end
install:
desc: Manual install of chart