mirror of
https://github.com/hashicorp/vault.git
synced 2025-12-03 08:31:51 +01:00
actions: support ent plugins in plugin update workflow (#28295)
This commit is contained in:
parent
620430d236
commit
b682a79551
16
.github/workflows/plugin-update.yml
vendored
16
.github/workflows/plugin-update.yml
vendored
@ -39,12 +39,19 @@ jobs:
|
|||||||
cache: false # save cache space for vault builds: https://github.com/hashicorp/vault/pull/21764
|
cache: false # save cache space for vault builds: https://github.com/hashicorp/vault/pull/21764
|
||||||
go-version-file: .go-version
|
go-version-file: .go-version
|
||||||
|
|
||||||
- name: update plugin
|
- name: Update plugin
|
||||||
|
if: github.repository == 'hashicorp/vault'
|
||||||
run: |
|
run: |
|
||||||
go get "github.com/hashicorp/${{ inputs.plugin }}@v${{ inputs.version }}"
|
go get "github.com/hashicorp/${{ inputs.plugin }}@v${{ inputs.version }}"
|
||||||
go mod tidy
|
go mod tidy
|
||||||
|
|
||||||
- name: detect changes
|
- 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
|
||||||
run: |
|
run: |
|
||||||
count=$(git status --porcelain=v1 2>/dev/null | wc -l)
|
count=$(git status --porcelain=v1 2>/dev/null | wc -l)
|
||||||
if [ "$count" -eq 0 ]; then
|
if [ "$count" -eq 0 ]; then
|
||||||
@ -52,7 +59,7 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: commit/push
|
- name: Commit and push
|
||||||
run: |
|
run: |
|
||||||
git config user.name hc-github-team-secure-vault-ecosystem
|
git config user.name hc-github-team-secure-vault-ecosystem
|
||||||
git config user.email hc-github-team-secure-vault-ecosystem@users.noreply.github.com
|
git config user.email hc-github-team-secure-vault-ecosystem@users.noreply.github.com
|
||||||
@ -72,8 +79,9 @@ jobs:
|
|||||||
gh pr create \
|
gh pr create \
|
||||||
--head "$VAULT_BRANCH" \
|
--head "$VAULT_BRANCH" \
|
||||||
--reviewer "$REVIEWER" \
|
--reviewer "$REVIEWER" \
|
||||||
|
--assignee "$REVIEWER" \
|
||||||
--title "Update ${{ inputs.plugin }} to v${{ inputs.version }}" \
|
--title "Update ${{ inputs.plugin }} to v${{ inputs.version }}" \
|
||||||
--body "This PR was generated by a GitHub Action. Full log: https://github.com/hashicorp/vault/actions/runs/${{ github.run_id }}"
|
--body "This PR was generated by a GitHub Action. Full log: https://github.com/${{ github.repository }}/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_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"
|
echo "vault_pr_url=$(gh pr list --head "$VAULT_BRANCH" --json url -q '.[0].url')" >> "$GITHUB_OUTPUT"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user