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

161 cross repo helm update workflow #162

Merged
merged 6 commits into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from 3 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
39 changes: 37 additions & 2 deletions .github/workflows/build-publish-production.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ jobs:
environment:
name: stable
runs-on: ubuntu-latest

outputs:
image_version: ${{ env.IMAGE_SEMVER }}

steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -79,4 +81,37 @@ jobs:
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
annotations: ${{ steps.meta.outputs.annotations }}
Richie1710 marked this conversation as resolved.
Show resolved Hide resolved
annotations: ${{ steps.meta.outputs.annotations }}

update-helm-charts:
needs: [build-stable]
environment: stable
runs-on: ubuntu-latest

steps:
- name: Configure Git User as GitHub Actions Bot
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'

- name: Checkout
uses: actions/checkout@v4
with:
repository: "${{ vars.DOCS_NEXT_CHARTS_ORG }}/${{ vars.DOCS_NEXT_CHARTS_REPO }}"
token: ${{ secrets.DOCS_NEXT_CHARTS_TOKEN }}

- name: Update Charts and Commit Changes
id: update_charts
env:
image: ${{ vars.REGISTRY }}/${{ vars.REGISTRY_ORG }}/${{ vars.IMG_NAME }}
tag: ${{ needs.build-stable.outputs.image_version }}
run: |
# docusaurus
sed -i 's/^version: .*/version: ${{ vars.DOCS_NEXT_CHART_VERSION }}.${{github.run_number}}/' ./charts/docusaurus/Chart.yaml
sed -i 's/^appVersion: .*/appVersion: ${{ env.tag }}/' ./charts/docusaurus/Chart.yaml
sed -i 's/^tag: .*/tag: ${{ env.tag }}/' ./charts/docusaurus/values-prod.yaml
sed -i 's/^image: .*/image: ${{ env.image }}/' ./charts/docusaurus/values-prod.yaml
# commit and push
git commit -am "Automatic commit from GitHub Actions triggered by action #${{github.run_number}}"
git remote set-url origin https://${{ secrets.DOCS_NEXT_CHARTS_TOKEN }}@github.com/${{ vars.DOCS_NEXT_CHARTS_ORG }}/${{ vars.DOCS_NEXT_CHARTS_REPO }}.git
git push origin main
akyriako marked this conversation as resolved.
Show resolved Hide resolved
37 changes: 35 additions & 2 deletions .github/workflows/build-publish-staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ jobs:
environment:
name: preview
runs-on: ubuntu-latest
outputs:
image_version: ${{ steps.build_image_tag.outputs.image_version }}

steps:
- name: Checkout
Expand All @@ -40,7 +42,7 @@ jobs:

- name: Build Image Tag
id: build_image_tag
run: echo "image_version=${{ steps.date.outputs.today }}-${{github.run_number}}-${{ steps.commit_hash.outputs.short }}" >> $GITHUB_OUTPUT
run: echo "image_version=${{ steps.date.outputs.today }}.${{github.run_number}}.0-${{ steps.commit_hash.outputs.short }}" >> $GITHUB_OUTPUT
Richie1710 marked this conversation as resolved.
Show resolved Hide resolved

- name: Build Container Image Metadata
id: meta
Expand Down Expand Up @@ -88,4 +90,35 @@ jobs:
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
annotations: ${{ steps.meta.outputs.annotations }}
annotations: ${{ steps.meta.outputs.annotations }}

update-helm-charts:
needs: [build-preview]
environment: preview
runs-on: ubuntu-latest

steps:
- name: Configure Git User as GitHub Actions Bot
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'

- name: Checkout
uses: actions/checkout@v4
with:
repository: "${{ vars.DOCS_NEXT_CHARTS_ORG }}/${{ vars.DOCS_NEXT_CHARTS_REPO }}"
token: ${{ secrets.DOCS_NEXT_CHARTS_TOKEN }}

- name: Update Charts and Commit Changes
id: update_charts
env:
image: ${{ vars.REGISTRY }}/${{ vars.REGISTRY_ORG }}/${{ vars.IMG_NAME }}
tag: ${{ needs.build-preview.outputs.image_version }}
run: |
# docusaurus
sed -i 's/^tag: .*/tag: ${{ env.tag }}/' ./charts/docusaurus/values-stg.yaml
sed -i 's/^image: .*/image: ${{ env.image }}/' ./charts/docusaurus/values-stg.yaml
# commit and push
git commit -am "Automatic commit from GitHub Actions triggered by action #${{github.run_number}}"
git remote set-url origin https://${{ secrets.DOCS_NEXT_CHARTS_TOKEN }}@github.com/${{ vars.DOCS_NEXT_CHARTS_ORG }}/${{ vars.DOCS_NEXT_CHARTS_REPO }}.git
git push origin main
akyriako marked this conversation as resolved.
Show resolved Hide resolved
Richie1710 marked this conversation as resolved.
Show resolved Hide resolved

This file was deleted.

139 changes: 0 additions & 139 deletions docs/blueprints/by-use-case/devops/crossplane/overview.md
Richie1710 marked this conversation as resolved.
Show resolved Hide resolved

This file was deleted.

2 changes: 1 addition & 1 deletion docusaurus.config.ts
Richie1710 marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ const config: Config = {
],
},
],
copyright: `© T-Systems International GmbH ${new Date().getFullYear()} (v` + process.env.REACT_APP_VERSION + `)`,
copyright: `© T-Systems International GmbH ${new Date().getFullYear()} (` + process.env.REACT_APP_VERSION + `)`,
},
prism: {
theme: prismThemes.oneDark,
Expand Down