Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Introduce Auto-Releases #22

Merged
merged 1 commit into from
Oct 30, 2024
Merged
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
3 changes: 3 additions & 0 deletions .github/config/.release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "3.21.0"
maxdanilov marked this conversation as resolved.
Show resolved Hide resolved
}
40 changes: 40 additions & 0 deletions .github/config/release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
"changelog-sections": [
{
"type": "chore",
"section": "Miscellaneous"
},
{
"type": "ci",
"section": "CI/CD"
},
{
"type": "deps",
"section": "Dependency Upgrades"
},
{
"type": "docs",
"section": "Documentation"
},
{
"type": "feat",
"section": "Features"
},
{
"type": "fix",
"section": "Bugfixes"
},
{
"type": "refactor",
"section": "Refactoring"
}
],
"changelog-type": "github",
"extra-label": "automerge",
"include-v-in-tag": false,
"packages": {
".": {}
},
"release-type": "simple"
}
31 changes: 31 additions & 0 deletions .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Automerge Release-Please PRs

on:
schedule:
- cron: '50 4 * * 1' # runs every Monday at 04:50 UTC

jobs:
auto-merge:
runs-on: ubuntu-latest
steps:
- name: Import Secrets
id: vault-secrets
uses: hashicorp/[email protected]
with:
url: ${{ secrets.VAULT_ADDR }}
method: approle
roleId: ${{ secrets.VAULT_ROLE_ID }}
secretId: ${{ secrets.VAULT_SECRET_ID}}
secrets: |
secret/data/products/infra/ci/infra-releases RELEASES_APP_ID;
secret/data/products/infra/ci/infra-releases RELEASES_APP_KEY;
- name: Generate a GitHub token for infra-rerun camunda/infra-global-github-actions
id: app-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ steps.vault-secrets.outputs.RELEASES_APP_ID }}
private-key: ${{ steps.vault-secrets.outputs.RELEASES_APP_KEY }}
- name: Automerge Release-Please PR
uses: camunda/infra-global-github-actions/teams/infra/pull-request/automerge@main
with:
github-token: ${{ steps.app-token.outputs.token }}
32 changes: 32 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Handle Release PRs

on:
push:
branches:
- master

jobs:
release-please:
runs-on: ubuntu-latest
steps:
- name: Import Secrets
id: vault-secrets
uses: hashicorp/[email protected]
with:
url: ${{ secrets.VAULT_ADDR }}
method: approle
roleId: ${{ secrets.VAULT_ROLE_ID }}
secretId: ${{ secrets.VAULT_SECRET_ID}}
secrets: |
secret/data/products/infra/ci/infra-releases RELEASES_APP_ID;
secret/data/products/infra/ci/infra-releases RELEASES_APP_KEY;
- name: Generate a GitHub token for infra-rerun camunda/infra-global-github-actions
id: app-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ steps.vault-secrets.outputs.RELEASES_APP_ID }}
private-key: ${{ steps.vault-secrets.outputs.RELEASES_APP_KEY }}
- name: Handle Release Creation
uses: camunda/infra-global-github-actions/teams/infra/pull-request/release@main
with:
github-token: ${{ steps.app-token.outputs.token }}