Skip to content

Commit

Permalink
[dash0] deploy new releases automatically
Browse files Browse the repository at this point in the history
  • Loading branch information
basti1302 committed Feb 1, 2024
1 parent c2b7549 commit 4358a5d
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 2 deletions.
34 changes: 34 additions & 0 deletions .github/actions/deploy-demo/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Copyright 2024 Dash0 Inc.
# SPDX-License-Identifier: Apache-2.0
name: Deploy Dash0 OTel Demo
description: deploy a release of the Dash0 fork of the OpenTelemetry demo
inputs:
token:
description: 'read/write Github access token for thr dash0-configuration repository'
required: true
containerImageVersion:
description: 'version tag of the Dash0 OTel Demo container images, e.g. 1.1.0'
required: true
runs:
using: "composite"
steps:
- name: checkout dash0-configuration
uses: actions/checkout@v4
with:
repository: dash0hq/dash0-configuration
token: ${{ inputs.token }}
path: dash0-configuration

- name: update container image version
uses: mikefarah/[email protected]
with:
cmd: yq -i '.otelDemo.helm.default.image.tag="${{ inputs.containerImageVersion }}"' dash0-configuration/demo/environments/aws/demo-eu-west-1-demo.yaml
- name: git push dash0-configuration
shell: bash
run: |
cd dash0-configuration
git add demo/environments/aws/demo-eu-west-1-demo.yaml
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git commit -am "chore(otel-demo): update otel-demo image version to ${{ inputs.containerImageVersion }}"
git push
16 changes: 15 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright The OpenTelemetry Authors
# SPDX-License-Identifier: Apache-2.0
name: "Publish Images"
name: "Publish Images & Deploy"

on:
release:
Expand All @@ -13,3 +13,17 @@ jobs:
push: true
version: ${{ github.event.release.tag_name }}
secrets: inherit

deploy_release:
name: deploy to https://otel-demo.eu-west-1.aws.dash0-demo.com/
needs:
- build_and_push_images
runs-on: ubuntu-latest
# do not run multiple deployment jobs concurrently
concurrency: deploy
steps:
- name: deploy release
uses: .github/actions/deploy-demo
with:
token: ${{ secrets.REPOSITORY_FULL_ACCESS_GITHUB_TOKEN }}
containerImageVersion: ${{ github.event.release.tag_name }}
3 changes: 2 additions & 1 deletion .licenserc.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"src/featureflagservice/assets/vendor/",
"src/featureflagservice/priv/",
"src/productcatalogservice/genproto/",
"internal/tools/"
"internal/tools/",
".github/actions/deploy-demo/action.yaml"
]
}

0 comments on commit 4358a5d

Please sign in to comment.