Skip to content

Commit

Permalink
Merge branch 'dev' into update-make-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
joeyorlando authored Jun 13, 2024
2 parents 97f5187 + 9baba27 commit b00f5d0
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 30 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/on-helm-release-pr-merged.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Update grafana/helm-charts repo

on:
push:
branches:
- main
paths:
- helm/oncall/Chart.yaml

jobs:
call-update-helm-repo:
uses: grafana/helm-charts/.github/workflows/update-helm-repo.yaml@main
with:
charts_dir: helm
cr_configfile: helm/cr.yaml
ct_configfile: helm/ct.yaml
secrets:
helm_repo_token: ${{ secrets.GH_HELM_RELEASE }}
57 changes: 27 additions & 30 deletions .github/workflows/on-release-published.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,26 +79,17 @@ jobs:
type=raw,value=${{ github.ref_name }}
type=raw,value=latest
merge-helm-release-pr:
name: Merge Helm release PR
create-helm-release-pr:
name: Create Helm release PR
needs:
- build-sign-and-publish-plugin-to-gcom
- build-engine-docker-image-and-publish-to-dockerhub
runs-on: ubuntu-latest
# These permissions are needed to assume roles from Github's OIDC.
# https://github.com/grafana/shared-workflows/tree/main/actions/get-vault-secrets
permissions:
contents: read
id-token: write
outputs:
helm_release_pr_number: ${{ fromJSON(steps.update-helm-chart-pr.outputs.pull_request).number }}
steps:
- name: Checkout project
uses: actions/checkout@v4
# This will fetch the secret keys from vault and set them as environment variables for subsequent steps
- name: Get Vault secrets
uses: grafana/shared-workflows/actions/get-vault-secrets@main
with:
repo_secrets: |
GITHUB_API_KEY=github_actions:github-api-key
- name: Prepare version tags
id: prepare-version-tags
run: |
Expand All @@ -113,32 +104,38 @@ jobs:
targetBranch: main
masterBranchName: main
createPR: true
# yamllint disable rule:line-length
description: |
This PR was created automatically by
[this github action](https://github.com/grafana/oncall/blob/dev/.github/workflows/on-release-published.yml).
This PR was created automatically by [this github action](https://github.com/grafana/oncall/blob/dev/.github/workflows/on-release-published.yml).
It will be auto-merged very soon, which will then release the updated version of the chart into the
`grafana/helm-charts` helm repository.
It will be auto-merged very soon, which will then release the updated version of the chart into the `grafana/helm-charts` helm repository.
# yamllint enable rule:line-length
message: "Release oncall Helm chart ${{ steps.prepare-version-tags.outputs.version }}"
changes: |
{
"version": "${{ steps.prepare-version-tags.outputs.version }}",
"appVersion": "${{ steps.prepare-version-tags.outputs.app-version }}"
}
merge-helm-release-pr:
name: Merge Helm release PR
needs:
- create-helm-release-pr
runs-on: ubuntu-latest
# These permissions are needed to assume roles from Github's OIDC.
# https://github.com/grafana/shared-workflows/tree/main/actions/get-vault-secrets
permissions:
id-token: write
contents: read
steps:
# This will fetch the secret keys from vault and set them as environment variables for subsequent steps
- name: Get Vault secrets
uses: grafana/shared-workflows/actions/get-vault-secrets@main
with:
repo_secrets: |
GITHUB_API_KEY=github_actions:github-api-key
- name: Merge pull Request
uses: juliangruber/merge-pull-request-action@v1
with:
github-token: ${{ env.GITHUB_API_KEY }}
number: ${{ fromJSON(steps.update-helm-chart-pr.outputs.pull_request).number }}

update-helm-repo:
name: Update Helm Repo
uses: grafana/helm-charts/.github/workflows/update-helm-repo.yaml@main
needs:
- merge-helm-release-pr
with:
charts_dir: helm
cr_configfile: helm/cr.yaml
ct_configfile: helm/ct.yaml
secrets:
helm_repo_token: ${{ secrets.GH_HELM_RELEASE }}
number: ${{ needs.create-helm-release-pr.outputs.helm_release_pr_number }}

0 comments on commit b00f5d0

Please sign in to comment.