Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion .github/workflows/dependabot-approve-and-request-merge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,27 @@ jobs:
runs-on: ubuntu-latest
if: github.event.pull_request.user.login == 'dependabot[bot]' && github.repository == github.event.pull_request.head.repo.full_name
steps:
- uses: contentful/github-auto-merge@v1
- uses: contentful/github-auto-merge@b995e4ecd10bed72105998808b1fe666d6b0892d # v2
id: auto-merge
with:
VAULT_URL: ${{ secrets.VAULT_URL }}

# After merge, explicitly trigger CI workflow.
# The auto-merge action uses the auto-generated workflow token for the merge,
# which by design doesn't trigger push-based workflows (prevents infinite loops).
- name: 'Retrieve Secrets from Vault'
id: vault
uses: hashicorp/vault-action@4c06c5ccf5c0761b6029f56cfb1dcf5565918a3b # v3.4.0
with:
url: ${{ secrets.VAULT_URL }}
role: ${{ github.event.repository.name }}-github-action
method: jwt
path: github-actions
exportEnv: false
secrets: |
github/token/${{ github.event.repository.name }}-semantic-release token | GITHUB_TOKEN;

- name: Trigger CI workflow on main
run: gh workflow run main.yaml --ref main
env:
GITHUB_TOKEN: ${{ steps.vault.outputs.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ permissions:
contents: read

on:
workflow_dispatch:
push:
branches: ['**']

Expand Down