Skip to content

Commit

Permalink
Inline GitHub actions
Browse files Browse the repository at this point in the history
Why:

ASF guidance is to [inline 3rd party GitHub actions](https://cwiki.apache.org/confluence/display/BUILDS/GitHub+Actions+status#GitHubActionsstatus-Security) as repository
submodules. This had already been done for the chart-releaser, chart-testing
and kind actions, but not for the helm-setup or create-pull-request
actions.

What:

Inline the remaining 3rd party GitHub Actions as submodules. The
official GitHub Action (checkout) remains external.

This commit also grants the chart-releaser workflow `content:write`
permissions to allow it to create releases.
  • Loading branch information
willholley committed Oct 25, 2022
1 parent c8a5bf4 commit b03d7af
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 7 deletions.
1 change: 1 addition & 0 deletions .github/actions/create-pull-request
Submodule create-pull-request added at b4d517
1 change: 1 addition & 0 deletions .github/actions/setup-helm
Submodule setup-helm added at b5b231
4 changes: 2 additions & 2 deletions .github/workflows/chart-rebuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
fetch-depth: 0

- name: Set up Helm
uses: azure/setup-helm@v3
uses: ./.github/actions/setup-helm
with:
version: v3.10.0

Expand Down Expand Up @@ -52,7 +52,7 @@ jobs:
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v4
uses: ./.github/actions/create-pull-request
with:
commit-message: Rebuild index.yaml
title: Rebuild index.yaml
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/chart-releaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- main

permissions:
contents: read
contents: write
deployments: write

jobs:
Expand All @@ -26,7 +26,7 @@ jobs:
git config user.email "[email protected]"
- name: Install Helm
uses: azure/setup-helm@v3
uses: ./.github/actions/setup-helm
with:
version: v3.10.0

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/chart-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
submodules: recursive

- name: Set up Helm
uses: azure/setup-helm@v3
uses: ./.github/actions/setup-helm
with:
version: v3.10.0

Expand All @@ -41,14 +41,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
persist-credentials: false
submodules: recursive

- name: Set up Helm
uses: azure/setup-helm@v3
uses: ./.github/actions/setup-helm
with:
version: v3.10.0

Expand Down
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,9 @@
[submodule ".github/actions/chart-releaser-action"]
path = .github/actions/chart-releaser-action
url = https://github.com/helm/chart-releaser-action.git
[submodule ".github/actions/setup-helm"]
path = .github/actions/setup-helm
url = https://github.com/Azure/setup-helm.git
[submodule ".github/actions/create-pull-request"]
path = .github/actions/create-pull-request
url = https://github.com/peter-evans/create-pull-request.git

0 comments on commit b03d7af

Please sign in to comment.