-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
55dac2a
commit 3a3f13e
Showing
1,030 changed files
with
16,149 additions
and
36,372 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,10 +8,6 @@ on: | |
description: 'Full name of the plugin, e.g., vault-plugin-auth-kubernetes' | ||
required: true | ||
type: string | ||
branch: | ||
description: 'Git branch name to use' | ||
required: true | ||
type: string | ||
version: | ||
description: 'Version of the plugin with *NO* "v", e.g., 1.2.3' | ||
required: true | ||
|
@@ -25,7 +21,7 @@ jobs: | |
plugin-update: | ||
runs-on: ubuntu-latest | ||
env: | ||
VAULT_BRANCH: ${{ inputs.branch }} | ||
VAULT_BRANCH: "update/${{ inputs.plugin }}/v${{ inputs.version }}" | ||
REVIEWER: ${{ inputs.reviewer || github.actor }} | ||
steps: | ||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
|
@@ -39,27 +35,20 @@ jobs: | |
cache: false # save cache space for vault builds: https://github.com/hashicorp/vault/pull/21764 | ||
go-version-file: .go-version | ||
|
||
- name: Update plugin | ||
if: github.repository == 'hashicorp/vault' | ||
- name: update plugin | ||
run: | | ||
go get "github.com/hashicorp/${{ inputs.plugin }}@v${{ inputs.version }}" | ||
go mod tidy | ||
- name: Update Enterprise-only plugin | ||
if: github.repository == 'hashicorp/vault-enterprise' | ||
run: | | ||
(cd vault_ent && go get "github.com/hashicorp/${{ inputs.plugin }}@v${{ inputs.version }}" && go mod tidy) | ||
go mod tidy | ||
- name: Detect changes | ||
- name: detect changes | ||
run: | | ||
count=$(git status --porcelain=v1 2>/dev/null | wc -l) | ||
if [ "$count" -eq 0 ]; then | ||
echo "::error::no updates were made for ${{ inputs.plugin }} with tag v${{ inputs.version }}" | ||
exit 1 | ||
fi | ||
- name: Commit and push | ||
- name: commit/push | ||
run: | | ||
git config user.name hc-github-team-secure-vault-ecosystem | ||
git config user.email [email protected] | ||
|
@@ -79,9 +68,8 @@ jobs: | |
gh pr create \ | ||
--head "$VAULT_BRANCH" \ | ||
--reviewer "$REVIEWER" \ | ||
--assignee "$REVIEWER" \ | ||
--title "Update ${{ inputs.plugin }} to v${{ inputs.version }}" \ | ||
--body "This PR was generated by a GitHub Action. Full log: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" | ||
--body "This PR was generated by a GitHub Action. Full log: https://github.com/hashicorp/vault/actions/runs/${{ github.run_id }}" | ||
echo "vault_pr_num=$(gh pr list --head "$VAULT_BRANCH" --json number -q '.[0].number')" >> "$GITHUB_OUTPUT" | ||
echo "vault_pr_url=$(gh pr list --head "$VAULT_BRANCH" --json url -q '.[0].url')" >> "$GITHUB_OUTPUT" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.